Find last system shut down time - Linux
This is a discussion on Find last system shut down time - Linux ; Hi,
I need to find the last system shutdown time. I got a command last that is used for this.But the command is not give the year. Below i posted the sample output.
last -x |grep shutdown
shutdown system down ...
-
Find last system shut down time
Hi,
I need to find the last system shutdown time. I got a command last that is used for this.But the command is not give the year. Below i posted the sample output.
last -x |grep shutdown
shutdown system down 2.6.31.5-server- Tue Jan 11 11:45 - 11:46 (00:00)
shutdown system down 2.6.31.5-server- Sat Dec 11 11:25 - 11:45 (31+00:20)
shutdown system down 2.6.31.5-server- Mon Jan 10 21:04 - 10:31 (13:27)
shutdown system down 2.6.31.5-server- Fri Jan 7 17:38 - 11:05 (2+17:26)
shutdown system down 2.6.31.5-server- Thu Jan 6 20:39 - 10:00 (13:21)
shutdown system down 2.6.31.5-server- Wed Jan 5 19:48 - 10:46 (14:58)
shutdown system down 2.6.31.5-server- Tue Jan 4 20:13 - 09:51 (13:38)
year field is important for me. how can i get that or is any other command is used to get the last shutdown time of the Linux system ?
Thanks in advance.
-
Re: Find last system shut down time
I know this is really late but the '-F' option should give you the year:
(distro - Debian)
$ last -xF|grep shutdown
shutdown system down 3.0.0-1-686-pae Tue Sep 6 17:55:30 2011 - Wed Sep 7 08:17:25 2011 (14:21)
shutdown system down 3.0.0-1-686-pae Fri Sep 2 17:56:48 2011 - Tue Sep 6 11:05:58 2011 (3+17:09)
shutdown system down 3.0.0-1-686-pae Thu Sep 1 16:57:16 2011 - Fri Sep 2 09:59:27 2011 (17:02)