Skip to content

common/hexdump: add POSIX page #16907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pages/common/hexdump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# hexdump

> Display file contents in hexadecimal, decimal, octal, or ASCII.
> Useful for inspect dump file, binary data, or debug output.
> More information: <https://www.unix.com/man_page/osx/1/hexdump/>.

- Print the hexadecimal representation of a file, replacing duplicate lines by '*':

`hexdump {{path/to/file}}`

- Display the input offset in hexadecimal and its ASCII representation in two columns:

`hexdump -C {{path/to/file}}`

- Display the hexadecimal representation of a file, but interpret only n bytes of the input:

`hexdump -C -n {{number_of_bytes}} {{path/to/file}}`

- Verbose - No suppression by '*' on duplicate lines:

`hexdump -v {{path/to/file}}`

- Format output using printf-like format string:

`hexdump -e '{{element_format .. end_format}}' {{path/to/file}}`