Difficulty: Easy
Correct Answer: od
Explanation:
Introduction / Context:
Inspecting raw file data is a common need when debugging encodings, binary formats, or control characters. UNIX provides tools to dump file contents in octal, hexadecimal, and ASCII, enabling byte-level verification independent of text encodings or editors.
Given Data / Assumptions:
Concept / Approach:
od stands for “octal dump.” It can print data in octal by default and also in hex or character formats using options (e.g., -t x1 for hex bytes, -c for characters). The other choices are not standard UNIX utilities for octal dumps: cd changes directories; of and oct are not standard commands.
Step-by-Step Solution:
Verification / Alternative check:
Running od -c /bin/sh | head demonstrates character and octal output, confirming the command's purpose.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
od.
Discussion & Comments