What does the `-n1` option do in the `tail` command?

0361

The -n1 option in the tail command specifies that only the last line of the file should be displayed.

For example, when you run the following command:

tail -n1 /tmp/hello

It will output just the last line of the file located at /tmp/hello. Without the -n1 option, the tail command would display the last 10 lines by default.

0 Comments

no data
Be the first to share your comment!