What directory is // [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • unix, difference between path starting with '/' and '//' [duplicate]

    4 answers



  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    6 answers



$ cd /
/$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old

/$ cd //
//$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old
//$ pwd
//

//$ cd ///
/$
/$ pwd
/


What is this trickery? What is //?







share|improve this question











marked as duplicate by Jeff Schaller, Romeo Ninov, muru, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
May 29 at 4:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • @JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
    – Vorac
    May 29 at 1:14










  • an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
    – Jeff Schaller
    May 29 at 1:35










  • "What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
    – muru
    May 29 at 3:00














up vote
0
down vote

favorite













This question already has an answer here:



  • unix, difference between path starting with '/' and '//' [duplicate]

    4 answers



  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    6 answers



$ cd /
/$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old

/$ cd //
//$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old
//$ pwd
//

//$ cd ///
/$
/$ pwd
/


What is this trickery? What is //?







share|improve this question











marked as duplicate by Jeff Schaller, Romeo Ninov, muru, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
May 29 at 4:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • @JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
    – Vorac
    May 29 at 1:14










  • an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
    – Jeff Schaller
    May 29 at 1:35










  • "What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
    – muru
    May 29 at 3:00












up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:



  • unix, difference between path starting with '/' and '//' [duplicate]

    4 answers



  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    6 answers



$ cd /
/$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old

/$ cd //
//$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old
//$ pwd
//

//$ cd ///
/$
/$ pwd
/


What is this trickery? What is //?







share|improve this question












This question already has an answer here:



  • unix, difference between path starting with '/' and '//' [duplicate]

    4 answers



  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    6 answers



$ cd /
/$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old

/$ cd //
//$ ls
bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz
boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old
//$ pwd
//

//$ cd ///
/$
/$ pwd
/


What is this trickery? What is //?





This question already has an answer here:



  • unix, difference between path starting with '/' and '//' [duplicate]

    4 answers



  • How does Linux handle multiple consecutive path separators (/home////username///file)?

    6 answers









share|improve this question










share|improve this question




share|improve this question









asked May 29 at 0:55









Vorac

94121732




94121732




marked as duplicate by Jeff Schaller, Romeo Ninov, muru, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
May 29 at 4:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Jeff Schaller, Romeo Ninov, muru, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
May 29 at 4:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • @JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
    – Vorac
    May 29 at 1:14










  • an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
    – Jeff Schaller
    May 29 at 1:35










  • "What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
    – muru
    May 29 at 3:00
















  • @JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
    – Vorac
    May 29 at 1:14










  • an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
    – Jeff Schaller
    May 29 at 1:35










  • "What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
    – muru
    May 29 at 3:00















@JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
– Vorac
May 29 at 1:14




@JeffSchaller the linked question indicates that A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. I am still curious as to why Linux implements in this way. Why the complexity of special behaviour? Only because it is permitted by the standard? Are there any non-obvious differences between the / and // directory?
– Vorac
May 29 at 1:14












an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
– Jeff Schaller
May 29 at 1:35




an ls -lid / // would probably show the same inode --> the same directory. Per the linked duplicate, There is one exception: if a pathname starts with exactly two slashes, it may be treated differently (ref: base definitions §4.11 pathname resolution). Linux itself doesn't do this
– Jeff Schaller
May 29 at 1:35












"What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
– muru
May 29 at 3:00




"What you're seeing is not, in fact, Linux doing anything special with //: it's bash's current directory tracking"
– muru
May 29 at 3:00















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay