| realpath(1) | General Commands Manual | realpath(1) |
NAME¶
realpath - Print the resolved path
SYNOPSIS¶
realpath [-q|--quiet] [-s|--strip] [-z|--zero] [-L|--logical] [-P|--physical] [-E|--canonicalize] [-e|--canonicalize-existing] [-m|--canonicalize-missing] [--relative-to] [--relative-base] [-h|--help] [-V|--version] <files>
DESCRIPTION¶
Print the resolved path
OPTIONS¶
- -q, --quiet
- Do not print warnings for invalid paths
- -s, --strip
- Only strip '.' and '..' components, but don't resolve symbolic links
- -z, --zero
- Separate output filenames with \0 rather than newline
- -L, --logical
- resolve '..' components before symlinks
- -P, --physical
- resolve symlinks as encountered (default)
- -E, --canonicalize
- all but the last component must exist (default)
- -e, --canonicalize-existing
- canonicalize by following every symlink in every component of the given name recursively, all components must exist
- -m, --canonicalize-missing
- canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence
- --relative-to <DIR>
- print the resolved path relative to DIR
- --relative-base <DIR>
- print absolute paths unless paths below DIR
- -h, --help
- Print help
- -V, --version
- Print version
- <files>
VERSION¶
v(uutils coreutils) 0.7.0
EXAMPLES¶
Display the absolute path for a file or directory:
realpath path/to/file_or_directory
Require all path components to exist:
realpath [-e|--canonicalize-existing] path/to/file_or_directory
Resolve `..` components before symlinks:
realpath [-L|--logical] path/to/file_or_directory
Disable symlink expansion:
realpath [-s|--no-symlinks] path/to/file_or_directory
Suppress error messages:
realpath [-q|--quiet] path/to/file_or_directory
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.
| realpath (uutils coreutils) 0.7.0 |