The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cd into a badly named directory? How?

Discussion in 'General Discussion' started by jols, Jan 31, 2007.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    I am trying to cd into a directory named exactly this:

    ---------- 2_files

    Of course the action gets two dashes in and responds with an invalid optioin error.

    Any ideas?
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Try changing its name first;
    #mv ---------- 2_files two_files
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    or try putting the name in quotes i.e.
    cd "---------- 2_files"
     
  4. zack6924

    zack6924 Member

    Joined:
    Sep 30, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    or cd -*2_files
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Another trick is to keep using <TAB> to complete the command line which will usually backslash as needed. Simplest is probably to use SFTP ;)
     
Loading...

Share This Page