Results 1 to 5 of 5

Thread: bash question

  1. #1

    bash question

    I know basic bash, back when it was just unix commands. I'm using cd to change directories; but how do you change directories with long file names?

    For example, I'm trying to setup wine and wanted to run something under the directory "Program Files". When I put in the command "cd Program Files", the error says no directory ProgramFiles. How do I change into that directory containing 2 separate words?

    Thanks for you help


  2. #2

    Re:bash question

    Use forward slashes for spaces:
    Program\ Files
    "Program Files"
    also, if you hit tab after typing in part of the directory name, it'll fill in the rest provided there are not other files or dirs with those characters.
    cd Pro[tab]
    changes to
    Program\ Files

    unless there's something else that begins with "Pro", then it'll beep, if you hit tab again, it'll list all files and dirs matching what you typed in.

  3. #3

    Re:bash question

    you can use the backslash as a general escape character. it works for spaces and other special characters that are usually interpreted in other ways.

  4. #4
    Mentor cga's Avatar
    Join Date
    May 2001

    Re:bash question

    Yup- tab completion is your friend. That's one reason why you can get really fast at CLI file management.

  5. #5

    Re:bash question

    or wildcards, but that's for multiple files

Similar Threads

  1. bash scripting question
    By seanmclemon in forum Programming
    Replies: 7
    Last Post: 09-07-2003, 12:58 AM
  2. Bash scripting question
    By kenshi in forum Programming
    Replies: 6
    Last Post: 01-02-2003, 08:36 PM
  3. C++/bash Question
    By Schotty in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 11-06-2002, 12:03 AM
  4. bash question
    By in forum Linux - Software, Applications & Programming
    Replies: 14
    Last Post: 08-30-2002, 03:24 AM
  5. Bash Script question....
    By gfunkmonk in forum Programming
    Replies: 6
    Last Post: 08-26-2002, 09:47 PM


Posting Permissions

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