Timeline for Absolute / canonical / relative paths
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 24 at 14:52 | comment | added | Serious Angel |
Just in case, in the standard path resolutions of Linux Kernel, multiple / are replaced by/treated as one. There are various places of such resolution steps as "trimming". For example: 1. github.com/torvalds/linux/blob/… ; 2. github.com/torvalds/linux/blob/… . We may test with readlink GLibC's function, or the syscall itself.
|
|
| Dec 17, 2018 at 8:12 | vote | accept | Tom Hale | ||
| Oct 17, 2017 at 12:59 | comment | added | Stephen Kitt | @Andrew hence the “if and only if”, and not mentioning inodes: you can delete one directory entry without affecting any of the others pointing to the same inode, so arguably they’re not the same file system objects. But I agree hard links do make the definition somewhat unsatisfactory. | |
| Oct 17, 2017 at 12:53 | comment | added | Andrew Henle | You can hard-link files, though, so I don't think you can state "the result should be identical if and only if the two file system objects are identical" as a single file can have more than one canonical/absolute path. | |
| Oct 16, 2017 at 19:17 | comment | added | John Kugelman |
It may be worth mentioning paths starting with ~. Shells will often expand such paths to absolute paths pointing at users' home directories.
|
|
| Oct 16, 2017 at 16:15 | comment | added | user232326 |
@marcelm After any repeated / (in the middle of the path) is converted to one / (if any exist), the path strings could be compared, yes. As such, I agree now.
|
|
| Oct 16, 2017 at 15:40 | comment | added | marcelm |
@Arrow The answer doesn't say that // in a path is not valid or permissible. It only states that they are not OK in a canonical path, and I would agree :)
|
|
| Oct 16, 2017 at 14:19 | comment | added | user232326 |
Any // or /// or any count //…// should be converted to (interpreted as) one /. In that sense, any // at the middle of (any) path is valid and permissible.
|
|
| Oct 16, 2017 at 13:54 | history | edited | Stephen Kitt | CC BY-SA 3.0 |
Canonical only works for existing objects.
|
| Oct 16, 2017 at 13:48 | history | edited | Stephen Kitt | CC BY-SA 3.0 |
// isn't necessarily network-related, is it?
|
| Oct 16, 2017 at 13:40 | history | answered | Stephen Kitt | CC BY-SA 3.0 |