How to browse directories in UNIX

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

  1. GigaWire macrumors 6502

    Dec 25, 2001
    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.

  2. Rower_CPU Moderator emeritus


    Oct 5, 2001
    San Diego, CA
    There are two ways:

    cd "Desktop DB"


    cd Desktop\ DB
  3. beerguy macrumors regular

    Aug 20, 2003
    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

    Nov 19, 2002
    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

    Jun 17, 2003
    Calgary, Alberta
    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

    Dec 25, 2001

Share This Page