Find the answer to your Linux question:
Results 1 to 6 of 6
I have a directory named My Computer and when I am in console I can't figure out how to CD to that directory. It tells me that directory does not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Posts
    1

    Using CD in console with two word directory name


    I have a directory named My Computer and when I am in console I can't
    figure out how to CD to that directory. It tells me that directory does not exist.
    There must be a method to entre this directory so that it knows it.
    Thanks for your help.

  2. #2
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314
    if there is a space in the name you have to either use double quotes or use a backslash for example
    Code:
    cd /"My Computer"
    cd /My\ Computer
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  3. #3
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Yeh use a backslash like so my\ file

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jan 2004
    Posts
    357
    a single quote works too.

    cd 'name1 name2'

  6. #5
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151
    hit `tab` and it completes the rest
    Have a nice day

  7. #6
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    Yes, TAB sometimes works if there are not multiple files that have "Spaces".

    But this is a good HINT.
    Just a Newbie....Looking 4 Info....

Posting Permissions

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