CmdID

CmdID / Commands

realpath

Display the canonical absolute pathname toybox

On Linux

Opens CmdID with your command. It is read in your browser and sent nowhere.

Linux

from the toybox, 0BSD
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 prefix

Several platforms

from tldr-pages, CC BY 4.0

Display the resolved absolute path for a file or directory.

Display the absolute path for a file or directory

realpath path/to/file_or_directoryIdentify

Require all path components to exist

realpath --canonicalize-existing path/to/file_or_directoryIdentify

Resolve .. components before symlinks

realpath --logical path/to/file_or_directoryIdentify

Disable symlink expansion

realpath --no-symlinks path/to/file_or_directoryIdentify

Suppress error messages

realpath --quiet path/to/file_or_directoryIdentify