Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-22-2004, 06:55 AM   #1
Registered: Apr 2004
Location: England
Distribution: Redhat 9
Posts: 123

Rep: Reputation: 15
Spaces on command line

Hey, can anyone tell me how I represent spaces when executing a program from a command line. Like if a file name was 'what ever' and its path was something like '/home/admin/what ever' how would I change to that directory at a command line?
Old 05-22-2004, 07:03 AM   #2
Registered: Mar 2004
Location: United Kingdom
Distribution: LFS
Posts: 74

Rep: Reputation: 15
If you had a directory called 'asd asd', you could use 'cd asd\ asd' to change to it, or 'cd "asd asd"'

Using the '\' character causes the shell to treat the next character literally, hence '\ ' is a space, as opposed to the next parameter for the command.
Old 05-22-2004, 08:17 AM   #3
Registered: Apr 2004
Location: England
Distribution: Redhat 9
Posts: 123

Original Poster
Rep: Reputation: 15


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
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
how to make the Read command handles spaces Kilahchris Linux - Newbie 7 11-06-2004 12:10 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 12:24 AM

All times are GMT -5. The time now is 12:59 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