realpath
Display the canonical absolute pathname toybox
On Linux
Linux
realpath [-LPemqsz] [--relative-base DIR] [-R DIR] FILE...
-R DIRShow ../path relative to DIR (--relative-to)-LLogical path (resolve .. before symlinks)-PPhysical path (default)-eCanonical path to existing entry (fail if missing)-mIgnore missing entries, show where it would be-qQuiet (no error messages)-sDon't expand symlinks-z NULinstead of newline--relative-baseIf path under DIR trim off prefixSeveral platforms
Display the resolved absolute path for a file or directory.
Display the absolute path for a file or directory
realpath path/to/file_or_directoryIdentifyRequire all path components to exist
realpath --canonicalize-existing path/to/file_or_directoryIdentifyResolve .. components before symlinks
realpath --logical path/to/file_or_directoryIdentifyDisable symlink expansion
realpath --no-symlinks path/to/file_or_directoryIdentifySuppress error messages
realpath --quiet path/to/file_or_directoryIdentify