Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm a Rails developer working on a web application on Ubuntu Server 10.04. Due to internal requirements, I was asked to find the last 10 system boot and shutdown times... I have no clue where to find these details. Could someone help me out?

share|improve this question

1 Answer

Use the last command.

last -x | grep shutdown
last -x | grep reboot

You can pipe this to the tail to read the last n instances. For example, in your case:

last -x | grep shutdown | tail -n 10
share|improve this answer
great answer, I add | tail -10 – enzotib Apr 26 '11 at 19:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.