dpkg-realpath โ print the resolved pathname with DPKG_ROOT support
| Use Case | Command | Description |
|---|---|---|
| ๐ Resolve pathname relative to root | dpkg-realpath /path/to/file | Resolves a pathname using DPKG_ROOT or / as the root directory |
| ๐ Resolve with custom root | dpkg-realpath --root /custom/root /path/to/file | Resolves pathname relative to a specified root directory |
| ๐ NUL-terminated output | dpkg-realpath -z /path/to/file | Outputs result with NUL byte instead of newline (for piping to xargs -0) |
| โ Show help | dpkg-realpath --help | Display usage message and exit |
| โน๏ธ Show version | dpkg-realpath --version | Display version information and exit |
dpkg-realpath [optionโฆ] pathname
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 /.
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-03 19:05 @216.73.216.23
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)