logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dpkg-realpath - print the resolved pathname with DPKG_ROOT support

Description

dpkg-realpath is a tool (since dpkg 1.20.1) to resolve a pathname, that takes the dpkg(1) root directory
       into account, either implicitly from the DPKG_ROOT environment variable or from the command-line --root
       or --instdir options, and returns an absolute pathname relative to the root directory.  The root
       directory must not be prefixed to the pathname to be resolved.

       This is intended to be used by other dpkg helpers, or by maintainer scripts instead of using realpath(1)
       or readlink(1) to canonicalize pathnames, as these latter commands do not support canonicalization
       relative to a different root than /.

       This program was introduced in dpkg 1.20.1.

Environment

DPKG_ROOT
           If set and the --instdir or --root options have not been specified, it will be used as the filesystem
           root directory.

       DPKG_COLORS
           Sets the color mode.  The currently accepted values are: auto (default), always and never.

       DPKG_NLS
           If set, it will be used to decide  whether  to  activate  Native  Language  Support,  also  known  as
           internationalization  (or  i18n)  support  (since  dpkg  1.22.7).   The  accepted values are: 0 and 1
           (default).

Name

       dpkg-realpath - print the resolved pathname with DPKG_ROOT support

Options

-z, --zero
           Use a NUL byte to end output lines instead of a new line character (since dpkg 1.20.6).

       --instdirdirectory--rootdirectory
           Set  the  root  directory  to directory, which is the base directory that pathnames get canonicalized
           against.  Defaults to «/» if DPKG_ROOT has not been set.

       -?, --help
           Show the usage message and exit.

       --version
           Show the version and exit.

See Also

realpath(1), readlink(1).

1.22.18                                            2025-03-20                                   dpkg-realpath(1)

Synopsis

dpkg-realpath [option...] pathname

See Also