Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Were is "cd //" documenmted ?

  1. #1
    Join Date
    Oct 2020
    Beans
    59

    Were is "cd //" documenmted ?

    I am sorry for asking this , obviously DOS question , way, way off topic...
    I did ask Mrs Google and got "certificate of deposit".
    Anybody have suggestion how to ask Mrs Google or have a link to "DOS shorthand commands
    Cheers

  2. #2
    Join Date
    Dec 2014
    Beans
    1,604

    Re: Were is "cd //" documenmted ?

    The 'cd' command is built into the shell. You can either look in the manual for your shell ('man bash' if you're using the default Bourne Again SHell; warning: long and extremely dense manual page) or use 'help cd'. And it's not a DOS-command originally, DOS 1.0 didn't have (sub-)directories; they copied that feature from Unix, which had a hierarchical file system since the early 70s.

    Holger

  3. #3
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    530
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Were is "cd //" documenmted ?

    If it's DOS, wouldn't it be cd \\ ?
    Never seen that syntax, though. Normal is cd \

  4. #4
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Were is "cd //" documenmted ?

    Sometimes the internet monkeys expect you to know what you are looking for before you know what you are looking for, unfortunately.

    You might change your search criteria to "DOS commands" or "MS-DOS commands" to cast a wider net.

    I found this, for instance.

    I'm not sure where you might find something official at a Microsoft site.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  5. #5
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    530
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Were is "cd //" documenmted ?

    I think the question is related to this thread:
    https://ubuntuforums.org/showthread....2451872&page=2

    cd // doesn't exist AFAIK, I suppose bash simply ignores the second "/"

  6. #6
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Were is "cd //" documenmted ?

    The link below is from a Ubuntu tutorial

    https://ubuntu.com/tutorials/command...ing-a-terminal

    And then there is section 3 from How - To - Geek

    https://www.howtogeek.com/412055/37-important-linux-commands-you-should-know

    All useful stuff if we ever need to use Recovery mode and the Root Shell prompt to try and fix things. I go back to the days when MS-Dos was not a shell but an operating system. Nothing could be done without a knowledge of Ms-Dos commands.

    Regards
    Last edited by grahammechanical; 3 Days Ago at 06:51 PM.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  7. #7
    Join Date
    Oct 2020
    Beans
    59

    Re: Were is "cd //" documenmted ?

    Quote Originally Posted by QIII View Post
    Sometimes the internet monkeys expect you to know what you are looking for before you know what you are looking for, unfortunately.

    You might change your search criteria to "DOS commands" or "MS-DOS commands" to cast a wider net.

    I found this, for instance.


    Been there, no go


    I'm not sure where you might find something official at a Microsoft site.
    Code:
    a@a-SATA:~$ cd \\
    bash: cd: \: No such file or directory
    a@a-SATA:~$ cd //
    a@a-SATA://$
    I am begging to wonder if it is Linux command.

    I think these are called "navigational shorthands " such as single dot "." or doulbe dot ".."

    I'll keep looking.

  8. #8
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,468
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Were is "cd //" documenmted ?

    Quote Originally Posted by ml9104 View Post
    I think the question is related to this thread:
    https://ubuntuforums.org/showthread....2451872&page=2

    cd // doesn't exist AFAIK, I suppose bash simply ignores the second "/"
    Bash doesn't really ignore that second /, but // is like a synonym for /. Bash appears to keep track of it and pwd, which is a shell built-in, will just report you're in //. However, /usr/bin/pwd, which is the same tool but now as a separate executable, will tell you the truth:
    Code:
    x@y:~$ cd //
    x@y://$ pwd
    //
    x@y://$ cd etc
    x@y://etc$ pwd
    //etc
    x@y://etc$ /usr/bin/pwd
    /etc
    So I'd say that // is a bash peculiarity.

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,314
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Were is "cd //" documenmted ?

    Code:
    cd /
    is the same as
    Code:
    cd //
    is the same as
    Code:
    cd //////////////home//////thefu
    # and
    cd /home/thefu
    More than 1 / is ignored by the OS. Always has been that way.

    Code tags really help people understand what is being typed into a terminal.

    Lots of these basic questions can be tested in 10 seconds.
    http://linuxcommand.org/tlcl.php covers Linux stuff in a good order since advanced skills build on intermediate skills that build on beginner skills. Trying to do non-beginner stuff when the skill level is still beginner leads to difficulties.
    Last edited by TheFu; 3 Days Ago at 10:58 PM.

  10. #10
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    530
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Were is "cd //" documenmted ?

    @TheFu:

    "More than 1 / is ignored by the OS. Always has been that way"
    Thanks. That was also my suspicion.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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