{"id":1433,"date":"2019-04-28T23:33:18","date_gmt":"2019-04-28T15:33:18","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1433"},"modified":"2019-05-01T15:09:02","modified_gmt":"2019-05-01T07:09:02","slug":"last","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/last","title":{"rendered":"last\u547d\u4ee4 – \u663e\u793a\u7528\u6237\u6216\u7ec8\u7aef\u7684\u767b\u5f55\u60c5\u51b5"},"content":{"rendered":"\n
last\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u663e\u793a\u8fd1\u671f\u7528\u6237\u6216\u7ec8\u7aef\u7684\u767b\u5f55\u60c5\u51b5\uff0c\u901a\u8fc7\u67e5\u770b\u7cfb\u7edf\u8bb0\u5f55\u7684\u65e5\u5fd7\u6587\u4ef6\u5185\u5bb9\uff0c\u8fdb\u800c\u4f7f\u7ba1\u7406\u5458\u53ef\u4ee5\u83b7\u77e5\u8c01\u66fe\u7ecf\u6216\u8005\u4f01\u56fe\u8fde\u63a5\u7cfb\u7edf\u3002<\/p>\n\n\n\n
\u6267\u884clast\u547d\u4ee4\u65f6\uff0c\u5b83\u4f1a\u8bfb\u53d6\/var\/log\u76ee\u5f55\u4e0b\u540d\u79f0\u4e3awtmp\u7684\u6587\u4ef6\uff0c\u5e76\u628a\u8be5\u6587\u4ef6\u8bb0\u5f55\u7684\u767b\u5f55\u7cfb\u7edf\u6216\u7ec8\u7aef\u7684\u7528\u6237\u540d\u5355\u5168\u90e8\u663e\u793a\u51fa\u6765\u3002\u9ed8\u8ba4\u663e\u793awtmp\u7684\u8bb0\u5f55\uff0cbtmp\u80fd\u663e\u793a\u7684\u66f4\u8be6\u7ec6\uff0c\u53ef\u4ee5\u663e\u793a\u8fdc\u7a0b\u767b\u5f55\uff0c\u4f8b\u5982ssh\u767b\u5f55\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>last [\u9009\u9879]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u663e\u793a\u8fd1\u671f\u7528\u6237\u6216\u7ec8\u7aef\u7684\u767b\u5f55\u60c5\u51b5\uff1a<\/p>\n\n\n\n \u7b80\u7565\u663e\u793a\uff0c\u5e76\u6307\u5b9a\u663e\u793a\u7684\u4e2a\u6570\uff1a<\/p>\n\n\n\n \u663e\u793a\u6700\u540e\u4e00\u5217\u663e\u793a\u4e3b\u673aIP\u5730\u5740\uff1a<\/p>\n\n\n\n last\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u663e\u793a\u8fd1\u671f\u7528\u6237\u6216\u7ec8\u7aef\u7684\u767b\u5f55\u60c5\u51b5\uff0c\u901a\u8fc7\u67e5\u770b\u7cfb\u7edf\u8bb0\u5f55\u7684\u65e5\u5fd7\u6587\u4ef6\u5185\u5bb9\uff0c\u8fdb\u800c\u4f7f\u7ba1\u7406\u5458\u53ef\u4ee5\u83b7\u77e5\u8c01\u66fe\u7ecf\u6216 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1433"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=1433"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1433\/revisions"}],"predecessor-version":[{"id":1834,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1433\/revisions\/1834"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-R <\/td> \u7701\u7565hostname\u7684\u680f\u4f4d<\/td><\/tr> usename<\/td> \u5c55\u793ausername\u7684\u767b\u5165\u8baf\u606f<\/td><\/tr> tty<\/td> \u9650\u5236\u767b\u5165\u8baf\u606f\u5305\u542b\u7684\u7ec8\u7aef\u4ee3\u53f7<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# last<\/pre>\n\n\n\n
[root@linuxcool ~]# last -n 5 -R<\/pre>\n\n\n\n
[root@linuxcool ~]# last -n 5 -a -i<\/pre>\n","protected":false},"excerpt":{"rendered":"