1

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 2

6

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

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .