1

According its own man page, the last command:

shows listing of last logged in users

This is exactly what I need. But why does it spam the output and list the reboots as well?

I want to see who logged in, not when the system was rebooted.

Is there any reason why reboots and shutdowns are displayed ?

  • It's easy to filter output. It's extremely hard generate output for data you don't have. – Patrick Nov 14 '14 at 3:01
  • Of course, if you are ambitious you are free to get the source code and change it for yourself locally. However, there might just be some software that depends on this information being there....maybe not. – mdpc Nov 14 '14 at 3:56
2

From the last man page:

The pseudo user reboot logs in each time the system is rebooted. Thus last reboot will show a log of all reboots since the log file was created.

As already noted, it is trivial using standard Unix commands to filter out these lines. One example:

$ last | grep -v "^reboot"

There is more explanation here to a similar question:

Output of the "last" command

Your Answer

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

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