mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 22:42:08 +02:00
Add odd command to the common
Not much to comment - https://linux.die.net/man/1/od Thanks
This commit is contained in:
parent
1fcc48e01a
commit
de1d5b05fa
1 changed files with 25 additions and 0 deletions
25
pages/common/od.md
Normal file
25
pages/common/od.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# od
|
||||
|
||||
> Display file contents in hexadecimal, octal or printable character format optionally along with
|
||||
> the byte offsets into the file
|
||||
|
||||
- Display file in octal format with the byte offsets in octal as well :
|
||||
|
||||
`od --address-radix=o --format=o -v {{/path/to/file}}`
|
||||
|
||||
- Display file in hexadecimal format with byte offsets in hexadecimal, 4 bytes per line with each entry 1 byte long :
|
||||
|
||||
`od --address-radix=x --format=x1 --width=4 -v {{/path/to/file}}`
|
||||
|
||||
- Display only printable strings of at least 5 characters long in the file along with the byte offsets in hexadecimal :
|
||||
|
||||
`od --address-radix=x --string=5 -v {{/path/to/file}}`
|
||||
|
||||
- Read only first {{number_of_bytes}} bytes of a file and display it in the hexadecimal format:
|
||||
|
||||
`od --address-radix=x --format=x --read-bytes {{number_of_bytes}} -v {{/path/to/file}}`
|
||||
|
||||
- Display file in hexadecimal format along with its character representation, also do not print byte offsets:
|
||||
|
||||
`od --address-radix=n --format=xz -v {{/path/to/file}}`
|
||||
|
Loading…
Add table
Reference in a new issue