Linux od Command Tutorial With Examples To Dump Files Octal Number Format

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-od-command-tutorial-examples-dump-files-octal-number-format/
PINTEREST
PINTEREST
INSTAGRAM

od is a tool used to  dump files or input in different presentation formtas like octal, decimal, hexadecimal etc. od command especially useful for binary analysis also can be used to debug Linux scripts for unwanted characters.

Help

Help

Help

Syntax

Display File Octal Mode

Octal mode is calculated with base 8 . We can print the file contents with -b option.

Display File Octal Mode

Display File Octal Mode

Display File ASCII Mode

As octal mode do not provide a human readable format. We humans generally uses ASCII or character mode to read. We can print all contents of the file with -c option.

Display File ASCII Mode

Display File ASCII Mode

Display File Decimal Mode

Decimal mode is base 10 for numeric formatting. Humans generally uses decimal mode to made math and numerical operations. We will use -i option.

Display File Decimal Mode

Display File Decimal Mode

Display File Hexadecimal 2 Byte Units

While displaying the printed as one byte interpretation. If the chars are Unicode and written as 2 byte displaying them 2 byte is a requirement.

Display File Hexadecimal 2 Byte Units

Display File Hexadecimal 2 Byte Units

Display File Octal 2 Byte Units

We can also display provided file as 2 byte units in octal mode. We will use -o option.

Display File Octal 2 Byte Units

Display File Octal 2 Byte Units

Display Byte Offset Hexadecimal

We can display byte offsets by using -Ax option.

Display Byte Offset Hexadecimal

Display Byte Offset Hexadecimal

Display Byte Offset Octal

We can display byte offsets by using -Ao option.

LEARN MORE  Best Linux Hex Editors

Display Byte Offset Octal

Display Byte Offset Octal

Display Byte Offset Decimal

We can display byte offsets by using -Ad option.

Display Byte Offset Decimal

Display Byte Offset Decimal

Hide Byte Offset

While displaying file data we can hide offset information with -An option

Hide Byte Offset

Hide Byte Offset

Start Displaying From Specified Byte

While displaying files the files may contain a lot of data. We may looking for some specific part of the file. Here we can specify the start byte index with -j option.

Start Displaying From Specified Byte

Start Displaying From Specified Byte

End Displaying At Specified Byte

Another option to specify the part we want to display is setting the end index of the file. We will set the end index number with -N option.

End Displaying At Specified Byte

End Displaying At Specified Byte

Hexadecimal Specify Start and Length Of Displayed Bytes

If we merge two previous example we can specify start and length of the byte index with -j and -N options.

Hexadecimal Specify Start and Length Of Displayed Bytes

Hexadecimal Specify Start and Length Of Displayed Bytes

Read Input From Command Line

Up to now we have provided related data from a file. ob command can also read data from standard input. We will use - to specify reading data from standard input. In order to end the read press CTRL+d

Read Input From Command Line

Read Input From Command Line

Display Hidden Characters

Some characters do not displayed by regular file commands and tools. But od command can display these hidden characters by default.

LEARN MORE  Best Free Hex Editors For Windows

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-od-command-tutorial-examples-dump-files-octal-number-format/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)