Find the answer to your Linux question:
Results 1 to 6 of 6
How do I navigate to directory with spaces ? Appretiate your hlep....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Posts
    2

    Directory with spaces on Linux


    How do I navigate to directory with spaces ? Appretiate your hlep.

  2. #2
    Linux Guru
    Join Date
    Mar 2003
    Location
    Wisconsin
    Posts
    1,907
    Use backslash space.

    Code:
    cd My\ Documents


    Jeremy
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  3. #3
    Just Joined!
    Join Date
    May 2004
    Location
    Frederick, MD, USA
    Posts
    93

    You can use quotes also.

    If there are multiple spaces it may be more convient to use quotes.

    Code:
    cd "Documents and Settings"
    At two spaces you need the same number of keystokes using quotes or blackslashes. At three you start to save typing. I am assume you need to navigate around a windows partition. A long time linux user avoids spaces. I usually use underscores.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2004
    Posts
    2
    Thanks.

  6. #5
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    the other thing to do would be to type the first few characters before the space then press the tab button, this is useful if you are typing long path names.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  7. #6
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    the best thing would be to rename everything so that there is a _ where all the spaces.
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •