How to browse directories in UNIX

Discussion in 'Mac Apps and Mac App Store' started by GigaWire, Oct 14, 2003.

  1. GigaWire macrumors 6502

    Joined:
    Dec 25, 2001
    #1
    Well not really that, but how do you open a directory in terminal that has a space in it. for example Desktop DB?

    % cd Desktop DB
    cd: Too many arguments.
    %


    Thanks
     
  2. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #2
    There are two ways:

    cd "Desktop DB"

    or

    cd Desktop\ DB
     
  3. beerguy macrumors regular

    Joined:
    Aug 20, 2003
    #3
    or cd Desktop?DB
    or cd Desktop*
    ...

    There is almost always more then one way to do things with Unix; that's part of the power.
     
  4. 3-22 macrumors regular

    Joined:
    Nov 19, 2002
    #4
    Re: How to browse directories in UNIX

    You could also type...

    cd Des{tab}

    Tab will complete the name... (or attempt to atleast)
     
  5. Chealion macrumors regular

    Joined:
    Jun 17, 2003
    Location:
    Calgary, Alberta
    #5
    The reason you got the error for too many arguments is that UNIX will not take spaces in a file name unless preceded by a backslash since the space is used as the seperator between arguments for a command.

    Simple Version: No can do spaces, put a backslash in front of any spaces or use tab to make life easier. (Auto-Complete)
     
  6. GigaWire thread starter macrumors 6502

    Joined:
    Dec 25, 2001

Share This Page