Multiple choice unix

Which command is used to display a file contents in octal form?

  1. cd

  2. od

  3. of

  4. oct

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

od (octal dump) displays file contents in octal format. cd changes directories, of is not a command, oct is not the correct command for this purpose.

AI explanation

The 'od' (octal dump) command in Unix/Linux displays the contents of a file in octal (or other) format, historically defaulting to octal byte values — hence the name. 'cd' changes directories, 'of' is not a real command, and 'oct' doesn't exist as a standard utility. 'od' is the correct, standard answer.