What does the -n option do in the head command?

0143

The -n option in the head command specifies the number of lines to display from the beginning of a file.

For example, if you use the command:

head -n 5 filename.txt

This command will show the first 5 lines of filename.txt. If you omit the -n option, head will display the first 10 lines by default. The -n option allows you to customize the output to show a specific number of lines as needed.

0 Comments

no data
Be the first to share your comment!