head

Practice head from memory. head defaults to the first 10 lines and writes them to stdout. Use -n N to change the count; pair with tail for sampling

Print the top 10 lines from filename.

head filename

head defaults to the first 10 lines and writes them to stdout. Use -n N to change the count; pair with tail for sampling middle ranges of a file.

Safety: Preview paths and redirections before changing files or streams.

Build the habit: BashDrill drills head and the rest of the Bash workflow until the safe first move is automatic. Try a Bash drill.