coreutils: realpath invocation

1 
1 18.5 ‘realpath’: Print the resolved file name.
1 ==============================================
1 
1 ‘realpath’ expands all symbolic links and resolves references to ‘/./’,
1 ‘/../’ and extra ‘/’ characters.  By default, all but the last component
1 of the specified files must exist.  Synopsis:
1 
1      realpath [OPTION]... FILE...
1 
1    The file name canonicalization functionality overlaps with that of
1 the ‘readlink’ command.  This is the preferred command for
1 canonicalization as it’s a more suitable and standard name.  In addition
1 this command supports relative file name processing functionality.
1 
11    The program accepts the following options.  Also see ⇒Common
 options.
1 
1 ‘-e’
1 ‘--canonicalize-existing’
1      Ensure that all components of the specified file names exist.  If
1      any component is missing or unavailable, ‘realpath’ will output a
1      diagnostic unless the ‘-q’ option is specified, and exit with a
1      nonzero exit code.  A trailing slash requires that the name resolve
1      to a directory.
1 
1 ‘-m’
1 ‘--canonicalize-missing’
1      If any component of a specified file name is missing or
1      unavailable, treat it as a directory.
1 
1 ‘-L’
1 ‘--logical’
1      Symbolic links are resolved in the specified file names, but they
1      are resolved after any subsequent ‘..’ components are processed.
1 
1 ‘-P’
1 ‘--physical’
1      Symbolic links are resolved in the specified file names, and they
1      are resolved before any subsequent ‘..’ components are processed.
1      This is the default mode of operation.
1 
1 ‘-q’
1 ‘--quiet’
1      Suppress diagnostic messages for specified file names.
1 
1 ‘--relative-to=DIR’
1      Print the resolved file names relative to the specified directory.
1      Note this option honors the ‘-m’ and ‘-e’ options pertaining to
1      file existence.
1 
1 ‘--relative-base=DIR’
1      Print the resolved file names as relative _if_ the files are
1      descendants of DIR.  Otherwise, print the resolved file names as
1      absolute.  Note this option honors the ‘-m’ and ‘-e’ options
1      pertaining to file existence.  For details about combining
11      ‘--relative-to’ and ‘--relative-base’, ⇒Realpath usage
      examples.
1 
1 ‘-s’
1 ‘--strip’
1 ‘--no-symlinks’
1      Do not resolve symbolic links.  Only resolve references to ‘/./’,
1      ‘/../’ and remove extra ‘/’ characters.  When combined with the
1      ‘-m’ option, realpath operates only on the file name, and does not
1      touch any actual file.
1 
1 ‘-z’
1 ‘--zero’
1      Output a zero byte (ASCII NUL) at the end of each line, rather than
1      a newline.  This option enables other programs to parse the output
1      even when that output would contain data with embedded newlines.
1 
1    Exit status:
1 
1      0 if all file names were printed without issue.
1      1 otherwise.
1 

Menu