{"id":1634,"date":"2019-05-10T23:30:10","date_gmt":"2019-05-10T15:30:10","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1634"},"modified":"2019-05-10T23:30:12","modified_gmt":"2019-05-10T15:30:12","slug":"lastb","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lastb","title":{"rendered":"lastb\u547d\u4ee4 – \u5217\u51fa\u767b\u5165\u7cfb\u7edf\u5931\u8d25\u7684\u7528\u6237"},"content":{"rendered":"\n
lastb\u547d\u4ee4\u7528\u4e8e\u663e\u793a\u7528\u6237\u9519\u8bef\u7684\u767b\u5f55\u5217\u8868\uff0c\u6b64\u6307\u4ee4\u53ef\u4ee5\u53d1\u73b0\u7cfb\u7edf\u7684\u767b\u5f55\u5f02\u5e38\u3002<\/p>\n\n\n\n
\u5355\u72ec\u6267\u884clastb\u547d\u4ee4\uff0c\u5b83\u4f1a\u8bfb\u53d6\u4f4d\u4e8e\/var\/log\u76ee\u5f55\u4e0b\uff0c\u540d\u79f0\u4e3abtmp\u7684\u6587\u4ef6\uff0c\u5e76\u628a\u8be5\u6587\u4ef6\u5185\u5bb9\u8bb0\u5f55\u7684\u767b\u5165\u5931\u8d25\u7684\u7528\u6237\u540d\u5355\uff0c\u5168\u90e8\u663e\u793a\u51fa\u6765\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f<\/strong>\uff1alastb [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570<\/strong>\uff1a<\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5217\u51fa\u767b\u5165\u5931\u8d25\u7684\u7528\u6237\u8bb0\u5f55\uff1a<\/p>\n\n\n\n \u4f7f\u7528-a\u53c2\u6570\u628aIP\u663e\u793a\u5728\u6700\u540e\u5217\uff1a<\/p>\n\n\n\n \u4f7f\u7528-R\u53c2\u6570\u4e0d\u663e\u793a\u4e3b\u673a\u540d\u548cIP\u4fe1\u606f\uff1a<\/p>\n\n\n\n lastb\u547d\u4ee4\u7528\u4e8e\u663e\u793a\u7528\u6237\u9519\u8bef\u7684\u767b\u5f55\u5217\u8868\uff0c\u6b64\u6307\u4ee4\u53ef\u4ee5\u53d1\u73b0\u7cfb\u7edf\u7684\u767b\u5f55\u5f02\u5e38\u3002 \u5355\u72ec\u6267\u884clastb\u547d\u4ee4\uff0c\u5b83\u4f1a\u8bfb\u53d6\u4f4d\u4e8e […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1634"}],"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=1634"}],"version-history":[{"count":13,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1634\/revisions"}],"predecessor-version":[{"id":1956,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1634\/revisions\/1956"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-a<\/td> \u628a\u4ece\u4f55\u5904\u767b\u5165\u7cfb\u7edf\u7684\u4e3b\u673a\u540d\u79f0\u6216ip\u5730\u5740\u663e\u793a\u5728\u6700\u540e\u4e00\u884c<\/td><\/tr> -d<\/td> \u5c06IP\u5730\u5740\u8f6c\u6362\u6210\u4e3b\u673a\u540d\u79f0<\/td><\/tr> -f<\/td> \u6307\u5b9a\u8bb0\u5f55\u6587\u4ef6<\/td><\/tr> -n<\/td> \u8bbe\u7f6e\u5217\u51fa\u540d\u5355\u7684\u663e\u793a\u5217\u6570<\/td><\/tr> -R<\/td> \u4e0d\u663e\u793a\u767b\u5165\u7cfb\u7edf\u7684\u4e3b\u673a\u540d\u79f0\u6216IP\u5730\u5740<\/td><\/tr> -x<\/td> \u663e\u793a\u7cfb\u7edf\u5173\u673a\uff0c\u91cd\u65b0\u5f00\u673a\uff0c\u4ee5\u53ca\u6267\u884c\u7b49\u7ea7\u7684\u6539\u53d8\u7b49\u4fe1\u606f<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# lastb \nroot ssh:notty 192.168.3.8 Mon Apr 29 14:25 - 14:25 (00:00) \nroot ssh:notty 192.168.3.8 Mon Apr 29 14:25 - 14:25 (00:00) \n\nbtmp begins Mon Apr 29 14:25:16 2019<\/pre>\n\n\n\n
[root@linuxcool ~]# lastb -a\nroot ssh:notty Mon Apr 29 14:25 - 14:25 (00:00) 192.168.3.8\nroot ssh:notty Mon Apr 29 14:25 - 14:25 (00:00) 192.168.3.8\n\nbtmp begins Mon Apr 29 14:25:16 2019<\/pre>\n\n\n\n
[root@linuxcool ~]# lastb -R\nroot ssh:notty Mon Apr 29 14:43 - 14:43 (00:00) \nroot ssh:notty Mon Apr 29 14:25 - 14:25 (00:00) \n\nbtmp begins Mon Apr 29 14:25:16 2019<\/pre>\n","protected":false},"excerpt":{"rendered":"