Linked Questions
18 questions linked to/from On what systems is //foo/bar different from /foo/bar?
0
votes
1
answer
168
views
Difference between `/` and `//` directories [duplicate]
Due to a typo, I accidentally cd into //. Which turns out to be a real directory (but same content as /)
So what is the difference between / and // (despite having identical content)
Real example: (...
152
votes
6
answers
31k
views
How does Linux handle multiple consecutive path separators (/home////username///file)?
I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...
60
votes
3
answers
21k
views
unix, difference between path starting with '/' and '//' [duplicate]
In unix/linux, any number of consecutive forwardslashes in a path is generally equivalent to a single forwardslash. eg.
$ cd /home/shum
$ pwd
/home/shum
$ cd /home//shum
$ pwd
/home/shum
$ cd /home///...
61
votes
4
answers
12k
views
Is the shell ksh93 dead?
On 2013-01-10 Glenn Fowler posted this to the ast-users mailing list:
As has been pointed out several times on the AST and UWIN lists, AT&T gives very little support to OpenSouce software, which ...
25
votes
4
answers
3k
views
Why does '/' contain '..'? [duplicate]
There's no directory above /, so what's the point of the .. in it?
6
votes
8
answers
15k
views
Check if shell variable contains an absolute path
I want to check if a shell variable contains an absolute path.
I don't care if the path exists or not—if it doesn't I'm going to create it—but I do want to ensure that I'm dealing with an absolute ...
10
votes
2
answers
2k
views
Find all absolute links in a directory tree
How do I (recursively) detect all symlinks in a directory that identify their target in an absolute as opposed to in a relative way?
Since these links are very likely to break when an entire ...
6
votes
3
answers
4k
views
What does dot forward slash forward slash mean (.//)?
I was querrying a server using a command like this:
find ./ -type f -name 'filename"
I got many files starting with
.//library
or
.//user
What do these things mean?
5
votes
3
answers
2k
views
Official Description UNC (Universal Naming Convention)
Can anybody point to a man page or specification that defines the Universal Naming Convention (UNC)? I'm looking for the original source of the idea
0
votes
5
answers
32k
views
Find files using shell script
I have the below script which looks for the file in the current directory and evaluates to true if the file exists in the directory and evaluates to false if it does not
#!/bin/bash
printf "\n Please ...
5
votes
3
answers
2k
views
Is it ok that find displays double forward-slash?
Is it a bug that, when I find ./path/here/ I get:
./path/here//foo
./path/here//bar
I know find wants me to specify the path without the trailing slash, but surely it can detect the path that tab-...
8
votes
2
answers
602
views
Is it "safe" to replace each occurrence of (possibly overlapped) `/./` with `/` in a path?
In POSIX compliant systems, is a path whose occurrences of (possibly overlapped) /./ have been substituted with / guaranteed to lead to the same target as the original one?
Example:
#!/bin/bash
shopt ...
2
votes
5
answers
554
views
How to remove duplicate slashes from path to a file?
I have a path to a file that has duplicate slashes which would like to simplify.
For example, if I have the following:
/opt//bin//executable
I would like to get:
/opt/bin/executable
4
votes
2
answers
695
views
Should TMPDIR have a trailing slash?
In Unix/POSIX/Linux systems it's possible to set the temporary directory via the TMPDIR variable. Wikipedia references a specification by the Open Group mentioning this.
What this doesn't answer for ...
4
votes
1
answer
251
views
Why can I cd to // but not /// or //// or ///// or … [duplicate]
When I change directory to //, it seems to put me in a special directory that is very similar to but slightly different to /. However, trying to add any further slashes (///) simply drops me in /.
$ ...