samtools(1) view -H my_sample.sam
Utilities for the Sequence Alignment/Map (SAM) format
-H      Output the header only.
source manpages: samtools