Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-08-2014, 06:40 PM   #1
Registered: Mar 2014
Posts: 444

Rep: Reputation: Disabled
How the file is listed in Ubuntu Terminal

Hi there. I do have a question. I created a file Commands 1 and placed it in the Documents directory. When I try "dir" command it shows the file as "Commands\ 1" That backslash is not a part of the file's name. Why is it so? You can see the thumbnail at the end of the text.

Also you can see in the terminal snapshot that I tried to use scrot command, took an image (png) but could not figure out how to use it (post it here, etc.). I ended up using my own software. Thanks, - AlexBB
Attached Thumbnails
Click image for larger version

Name:	LinuxProblem.png
Views:	2
Size:	52.5 KB
ID:	14912  

Last edited by AlexBB; 03-08-2014 at 06:42 PM.
Old 03-08-2014, 06:47 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,406

Rep: Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396
In *nix generally, a space between args to a cmd indicate separate arguments, so the space is (needs to be) 'escaped' using a '\' immediately before it, in order to indicate its a continuation instead.
In some cases, using single or double quotes around the whole thing works as well.

Long story short: although a space char is a syntactically valid part of a filename or cmd name or an argument, in reality it results in a lot of awkwardness; don't do it.
You'll thank me later

See the many threads that end up talking about this.
Old 03-08-2014, 06:51 PM   #3
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
Thanks for the post. You've answered my curiosity fully. -AlexBB


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] using awk to find item listed in one file in another file - runs very long bop-a-nator Linux - Newbie 5 02-12-2013 07:37 PM
Fonts not listed in gnome-terminal preferences fakie_flip Linux - Software 1 01-24-2013 11:31 AM
Run a file check from Terminal in Ubuntu 10.10 gael33 Linux - Newbie 3 12-22-2010 05:27 AM
[SOLVED] Gnome terminal 2.1.0, centos 5 - how to 'find' text listed on terminal screen linuxquestions_forum_use Linux - Newbie 2 12-21-2010 08:35 PM
sed delete lines from file one if regexp are listed in file two fucinheira Programming 6 09-17-2009 08:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration