Find the answer to your Linux question:
Results 1 to 4 of 4
So I have an Eee Pc laptop, and Im trying to install the Freeciv game. It tells me I have to "cd" into the top level directory before I do ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    2

    Unable to "cd" into a directory

    So I have an Eee Pc laptop, and Im trying to install the Freeciv game. It tells me I have to "cd" into the top level directory before I do anything, so thats what I set out to do. I right click the extracted freeciv folder, click properties, and its directory is:

    /home/user/My Documents/freeciv-2.1.5

    so I open a terminal and type

    cd /home/user/My Documents/freeciv-2.1.5

    and it says it cant find the directory /home/user/My

    so I delete the space, and this time it cant find MyDocuments

    I decide to ls -a ~/ as i leared on a google hunt, and it shows me alot of files, including My Documents, and that and Trash are the only 2 without a "." infront, and indented below My documents it doesn't list the files that are in there according to the windows-like file manager, just some things that came pre installed like firefox and open office.

    No matter what variation of My Documents I try, it wont listen

    Help!

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    There's two ways to do it, you can either use quotes on the file path or you can use an escape character. Try this -
    Code:
    /home/user/My\ Documents/freeciv-2.1.5
    The backslash tells bash to ignore the space as a delimiter (break) and to treat it as part of the string.

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    2
    Quote Originally Posted by bigtomrodney View Post
    There's two ways to do it, you can either use quotes on the file path or you can use an escape character. Try this -
    Code:
    /home/user/My\ Documents/freeciv-2.1.5
    The backslash tells bash to ignore the space as a delimiter (break) and to treat it as part of the string.
    You have just made my day.

  4. #4
    Linux Newbie
    Join Date
    Jun 2006
    Location
    Greece, Athens
    Posts
    214
    Another way is write the first few letters of file or directory and then press the TAB. It will autocomplete the file or directory name, including the required backslashes.

Posting Permissions

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