realpath
[-q] [filename ...]
realpath
-h
realpath
-v
realpath
uses realpath(3)
to resolve the path of the filename(s) supplied as arguments.
-q
realpath
is executed quitely, i.e., warnings are not printed on errors.
-h
Prints usage information.
-v
Prints realpath
version.
Regardless of the current directory:
realpath /tmp
prints
/private/tmp
which is the physical path.
realpath ~ /opt/local/
prints
/Users/javier
/opt/local
realpath -q /not_existent_path
does not print anything because -q
was used.
realpath /not_existent_path
prints
realpath: /not_existent_path: No such file or directory
to the standard error output.
- Exits with 0 status on success.
- If
-q
is used exits with 0 status even if errors occurred. - Exits with non 0 status if errors occur and
-q
was not used.
realpath(3)
readlink(1)
Copyright (c) 2014 - 2024, Javier.