LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-08-2014, 07:40 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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 07:42 PM.
 
Old 03-08-2014, 07:47 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
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, 07:51 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

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


Reply


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 08:37 PM
Fonts not listed in gnome-terminal preferences fakie_flip Linux - Software 1 01-24-2013 12:31 PM
Run a file check from Terminal in Ubuntu 10.10 gael33 Linux - Newbie 3 12-22-2010 06: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 09:35 PM
sed delete lines from file one if regexp are listed in file two fucinheira Programming 6 09-17-2009 09:28 AM


All times are GMT -5. The time now is 03:55 PM.

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