LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Spaces on command line (https://www.linuxquestions.org/questions/linux-software-2/spaces-on-command-line-184438/)

odd 05-22-2004 06:55 AM

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?

jmorse 05-22-2004 07:03 AM

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.

odd 05-22-2004 08:17 AM

Thanks :D


All times are GMT -5. The time now is 01:12 AM.