Celeb Glow
news | March 16, 2026

Linux command: tail

I had come a cross a question from a class I'm currently taking. I know, I shouldn't seek help and figure it out by myself; but I gave up on it after looking all over the class book as well as internet. The question reads as this:  

"In /var/log/, there should be a file that records every email message sent. Using the tail command and the appropriate switch (which you may have to find by using the man command) display the last 11 lines of that file to the screen. Paste the command and output here."

What I've done so far:

cd /var/log
tail -11 messages

But it says you may have to use man command to find appropriate switch. How would I do that? Could you please help me? Thank you.

1

2 Answers

If you'd like to see the man(manual) page for a particular command(i.e. tail)

man tail

press 'q' to exit man pages.

or

tail --help
tail --help | less

press 'q' to exit

I normally look for sent emails in /var/log/mail.log

To display the last 11 lines of the tail command you can specify the -n option:

tail -n 11 /var/log/mail.log

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy