
hexdump | 205
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Options
-c num[b|k|m], --bytes num [b|k|m]
Print first num bytes or, if num is followed by b, k,orm, first
num 512-byte blocks, 1-kilobyte blocks, or 1-megabyte blocks.
--help
Display help and then exit.
-n num, --lines num, -num
Print first num lines. Default is 10.
-q, --quiet, --silent
Quiet mode; never print headers giving filenames.
-v, --verbose
Print filename headers, even for only one file.
--version
Output version information and then exit.
Examples
Display the first 20 lines of phone_list:
head -20 phone_list
Display the first 10 phone numbers having a 202 area code:
grep '(202)' phone_list | head
hexdump
hexdump [options] file
Display specified file or input in hexadecimal, octal, decimal, or
ASCII format. Option flags are used to specify the display format.
Options
-b Use a one-byte octal display, meaning the input offset is in
hexadecimal and is followed by 16 three-column octal data
bytes, filled in with zeroes and separated by spaces.
-c Use a one-byte character display, meaning the input offset is in
hexadecimal and is followed by 16 three-column entries, filled
in with zeroes and separated with spaces.
-C Canonical mode. Display hexadecimal offset, two sets of eight
columns of hexadecimal bytes, then a | followed by the ASCII
representation of those same bytes. ...