in reply to Re^3: How to get the unique canonical path of a given path?
in thread How to get the unique canonical path of a given path?
realpath absolutely does resolve links.
$ perl -MPath::Tiny -E 'say path("/home/ikegami/tmp")->realpath' /tmp/ikegami
There's also an example in the OP.
It's the only way to safely remove «..». Well, technically you only need to resolve links to the left of the «..».
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to get the unique canonical path of a given path?
by hippo (Archbishop) on Jul 14, 2022 at 15:27 UTC |