<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux last reboot time and date find out</title> <atom:link href="http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: alexander</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-175723</link> <dc:creator>alexander</dc:creator> <pubDate>Thu, 17 Nov 2011 20:47:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-175723</guid> <description>last &#124; grep USERNAME &#124; grep tty &#124; head -n 1 &#124;awk -F &#039; &#039; &#039;{print $7}&#039;</description> <content:encoded><![CDATA[<p>last | grep USERNAME | grep tty | head -n 1 |awk -F &#8216; &#8216; &#8216;{print $7}&#8217;</p> ]]></content:encoded> </item> <item><title>By: lavermil</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-171913</link> <dc:creator>lavermil</dc:creator> <pubDate>Mon, 13 Jun 2011 21:02:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-171913</guid> <description>The uptime idea from Sam is nice but really that just returns the uptime (same as the uptime command) in date format.</description> <content:encoded><![CDATA[<p>The uptime idea from Sam is nice but really that just returns the uptime (same as the uptime command) in date format.</p> ]]></content:encoded> </item> <item><title>By: Sam Hocevar</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-170351</link> <dc:creator>Sam Hocevar</dc:creator> <pubDate>Mon, 28 Mar 2011 14:34:28 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-170351</guid> <description>&lt;em&gt;wtmp&lt;/em&gt; is rotated by the system, so the &lt;em&gt;last&lt;/em&gt; solution will stop working. I believe the most reliable solution is:
&lt;pre&gt;date -d &quot;`cut -f1 -d. /proc/uptime` seconds ago&quot;&lt;/pre&gt;</description> <content:encoded><![CDATA[<p><em>wtmp</em> is rotated by the system, so the <em>last</em> solution will stop working. I believe the most reliable solution is:</p><pre>date -d "`cut -f1 -d. /proc/uptime` seconds ago"</pre>]]></content:encoded> </item> <item><title>By: Nick</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-169937</link> <dc:creator>Nick</dc:creator> <pubDate>Wed, 16 Mar 2011 23:48:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-169937</guid> <description>In order to track who rebooted a linux machine, I would:
- disable root logins; many users sharing root is bad
- create a list of sudoers, so only people listed there could shutdown / reboot / halt
- /var/log/messages would contain traces of who ran sudo shutdown -r now or such</description> <content:encoded><![CDATA[<p>In order to track who rebooted a linux machine, I would:<br
/> - disable root logins; many users sharing root is bad<br
/> - create a list of sudoers, so only people listed there could shutdown / reboot / halt<br
/> - /var/log/messages would contain traces of who ran sudo shutdown -r now or such</p> ]]></content:encoded> </item> <item><title>By: L_kernel</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-159810</link> <dc:creator>L_kernel</dc:creator> <pubDate>Thu, 23 Sep 2010 13:38:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-159810</guid> <description>Thanks a lot!
I help me!</description> <content:encoded><![CDATA[<p>Thanks a lot!<br
/> I help me!</p> ]]></content:encoded> </item> <item><title>By: Ajeet</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-158976</link> <dc:creator>Ajeet</dc:creator> <pubDate>Tue, 17 Aug 2010 10:12:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-158976</guid> <description>Can we find who rebooted the linux box?</description> <content:encoded><![CDATA[<p>Can we find who rebooted the linux box?</p> ]]></content:encoded> </item> <item><title>By: xera</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-152156</link> <dc:creator>xera</dc:creator> <pubDate>Sun, 06 Dec 2009 15:04:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-152156</guid> <description>the command &quot;last reboot&quot; worked for me, on my mac!</description> <content:encoded><![CDATA[<p>the command &#8220;last reboot&#8221; worked for me, on my mac!</p> ]]></content:encoded> </item> <item><title>By: diana</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141410</link> <dc:creator>diana</dc:creator> <pubDate>Tue, 16 Oct 2007 03:45:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141410</guid> <description>Thanks vivek.its working great.....</description> <content:encoded><![CDATA[<p>Thanks vivek.its working great&#8230;..</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141406</link> <dc:creator>vivek</dc:creator> <pubDate>Mon, 15 Oct 2007 14:12:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141406</guid> <description>My bad...I forgot to include double quote ...
&lt;pre&gt;59 11 * * * last &#124; grep &quot;$(date &#039;+%a %b %d&#039;)&quot; &gt; /tmp/users.out ; mail -s “Users Logged&quot;&lt;/pre&gt;
Also you may wanna try out:
&lt;pre&gt;last -t yyyymmddhhmmss&lt;/pre&gt;
HTH</description> <content:encoded><![CDATA[<p>My bad&#8230;I forgot to include double quote &#8230;</p><pre>59 11 * * * last | grep "$(date '+%a %b %d')" > /tmp/users.out ; mail -s “Users Logged"</pre><p>Also you may wanna try out:</p><pre>last -t yyyymmddhhmmss</pre><p>HTH</p> ]]></content:encoded> </item> <item><title>By: diana</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141405</link> <dc:creator>diana</dc:creator> <pubDate>Mon, 15 Oct 2007 13:25:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141405</guid> <description>thanks a lot vivek.i din&#039;t expect this much fast reply.But unfortunately when i execute,
$ last &#124; grep $(date &#039;+%a %b %d&#039;)
i couldn&#039;t get anything.Please help</description> <content:encoded><![CDATA[<p>thanks a lot vivek.i din&#8217;t expect this much fast reply.But unfortunately when i execute,<br
/> $ last | grep $(date &#8216;+%a %b %d&#8217;)<br
/> i couldn&#8217;t get anything.Please help</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141403</link> <dc:creator>vivek</dc:creator> <pubDate>Mon, 15 Oct 2007 13:06:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141403</guid> <description>Should be..
&lt;pre&gt;59 11 * * * last &#124; grep $(date &#039;+%a %b %d&#039;) &gt; /tmp/users.out ; mail -s “Users Logged&quot;&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>Should be..</p><pre>59 11 * * * last | grep $(date '+%a %b %d') &gt; /tmp/users.out ; mail -s “Users Logged"</pre>]]></content:encoded> </item> <item><title>By: diana</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141402</link> <dc:creator>diana</dc:creator> <pubDate>Mon, 15 Oct 2007 12:57:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-141402</guid> <description>i couldn&#039;t find out the error. please help me.
#Send list of users logged on to server via email
59 11 * * * last &#124; grep date ‘+%a %b %d’ &gt; /tmp/users.out ; mail -s “Users Logged Today” ephrondiana@gmail.com
when i tried to execute,
$ last &#124;grep date &#039;+%a %b %d&#039;
i got no such file or directory error.</description> <content:encoded><![CDATA[<p>i couldn&#8217;t find out the error. please help me.</p><p>#Send list of users logged on to server via email<br
/> 59 11 * * * last | grep date ‘+%a %b %d’ &gt; /tmp/users.out ; mail -s “Users Logged Today” <a
href="mailto:ephrondiana@gmail.com">ephrondiana@gmail.com</a></p><p>when i tried to execute,<br
/> $ last |grep date &#8216;+%a %b %d&#8217;<br
/> i got no such file or directory error.</p> ]]></content:encoded> </item> <item><title>By: jamshid</title><link>http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-77799</link> <dc:creator>jamshid</dc:creator> <pubDate>Thu, 22 Feb 2007 11:29:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html#comment-77799</guid> <description>On my FC5 system instead of
last reboot &#124; head -1
I can type
last reboot  -1</description> <content:encoded><![CDATA[<p>On my FC5 system instead of<br
/> last reboot | head -1<br
/> I can type<br
/> last reboot  -1</p> ]]></content:encoded> </item> </channel> </rss>
