2018-10-01 17:36:30 +01:00
|
|
|
# realpath
|
|
|
|
|
|
|
|
> Display the resolved absolute path for a file or directory.
|
2021-03-30 09:39:58 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/realpath-invocation.html>.
|
2018-10-01 17:36:30 +01:00
|
|
|
|
|
|
|
- Display the absolute path for a file or directory:
|
|
|
|
|
|
|
|
`realpath {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Require all path components to exist:
|
|
|
|
|
|
|
|
`realpath --canonicalize-existing {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Resolve ".." components before symlinks:
|
|
|
|
|
|
|
|
`realpath --logical {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Disable symlink expansion:
|
|
|
|
|
|
|
|
`realpath --no-symlinks {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Suppress error messages:
|
|
|
|
|
|
|
|
`realpath --quiet {{path/to/file_or_directory}}`
|