How do I show the header of a file in Unix?

I generally use od -bc {filename} | head to look at the header of a binary file. view works too, but I find that it is generally better to see the output directly on the terminal.


The question is a bit wide in scope, so the suggestion is to approach in steps.

  1. Use file command to get first level information: File (Unix).
  2. Then subsequently use FFMPG for audio video headers.
  3. And dump for object files.

See also: ffmpeg command line options