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 ?

Martin Vegter
  • 358
  • 75
  • 236
  • 411
  • It's easy to filter output. It's extremely hard generate output for data you don't have. – phemmer Nov 14 '14 at 03: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 03:56

1 Answers1

3

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

Alex D.
  • 86