Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I don't know how many of you guyz came across this, type Code: cd // ls what's the difference between cd / and cd // Do we have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,741

    Exclamation cd // ?


    Hi all,
    I don't know how many of you guyz came across this,
    type
    Code:
    cd //
    ls
    what's the difference between cd / and cd //
    Do we have special // directory or is it some kind of a bug
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  2. #2
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Neither. Multiple slashes are folded to one for convenience so /home/mydir and ///////home///////////////mydir as equivalent (though the latter takes more typing). It means, for example, that you don't have to worry about whether your HOME variable ends with a slash when you do something like "cd $HOME/myfiles".

Posting Permissions

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