{"id":426985,"date":"2021-04-12T15:02:22","date_gmt":"2021-04-12T07:02:22","guid":{"rendered":"http:\/\/4563.org\/?p=426985"},"modified":"2021-04-12T15:02:22","modified_gmt":"2021-04-12T07:02:22","slug":"%e6%9c%89%e4%bb%80%e4%b9%88%e5%8a%9e%e6%b3%95%e8%ae%b0%e5%bd%95%e4%b8%8b-linux-%e6%89%a7%e8%a1%8c%e8%bf%87%e7%9a%84-history-%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=426985","title":{"rendered":"\u6709\u4ec0\u4e48\u529e\u6cd5\u8bb0\u5f55\u4e0b Linux \u6267\u884c\u8fc7\u7684 history \u547d\u4ee4"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6709\u4ec0\u4e48\u529e\u6cd5\u8bb0\u5f55\u4e0b Linux \u6267\u884c\u8fc7\u7684 history \u547d\u4ee4               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yanzhiling2001 <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u8bb0\u5f55\u4e0b\u6765 history\uff0c\u907f\u514d history -c \u6216\u8005\u5176\u4ed6\u547d\u4ee4\u6e05\u7a7a\u6267\u884c\u5386\u53f2      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>15<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5734955\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhoudaiyu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f7f\u7528 JumpServer \u7ba1\u7406\u670d\u52a1\u5668\uff08\u81ea\u5e26\u5f55\u5c4f\u548c\u5386\u53f2\u547d\u4ee4\u67e5\u8be2\uff09                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734956\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Rico <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             history &gt; history.txt ?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734957\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hei1000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ec0\u4e48 shell \uff1f bash \u7684\u8bdd\u6709~\/.bash_history, fish \u7684\u8bdd\u6709~\/.local\/share\/fish\/fish_history \u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734958\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yanzhiling2001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hei1000 #3 \u8fd9\u4e2a\u4e0d\u9519\u554a\uff0c\u5389\u5bb3\u5389\u5bb3\uff0c\u89e3\u51b3\u95ee\u9898\u4e86\u3002\u76f4\u63a5\u8bfb\u53d6\u8fd9\u4e2a\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86\uff0chistory -c \u6e05\u7a7a\u4e86\u4e5f\u80fd\u770b\u5230                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734959\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : raaaaaar <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bb0\u5f55\u4e0b\u6765\uff1f\u6211\u5728\u7528 zsh \u6709\u4e2a\u5386\u53f2\u63d2\u4ef6\uff0c\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734960\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 24bit <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });echo $(date +&#8221;%Y-%m-%d %H:%M:%S&#8221;) [$(whoami)@$SSH_USER$LOGIN_IP `pwd` ]&#8221; $msg&#8221; &gt;&gt; \/var\/log\/.history; }&#8217;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734961\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Skmgo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \/etc\/profile history \u4ece 1000 \u6539\u4e3a 0\uff0c\u8fd9\u662f\u6211\u62ff\u5230\u6bcf\u4e2a\u65b0\u673a\u5668\u7b2c\u4e00\u4ef6\u8981\u505a\u7684\u4e8b\u60c5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734962\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PMR <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Auditd forward remote rsyslog                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734963\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : css3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ctrl + r                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734964\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dengshen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Skmgo \u8fd9\u6837\u505a\u7684\u610f\u4e49\u662f\u4ec0\u4e48\u5462\uff1f\u4e0d\u592a\u61c2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734965\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yanzhiling2001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dengshen #10 \u907f\u514d\u8ffd\u8e2a\u3002\u597d\u591a\u4e91\u90fd\u6709\u76d1\u63a7\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734966\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dengshen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanzhiling2001 GitHub \u6709\u4e2a\u9488\u5bf9\u817e\u8baf\u4e91\u76d1\u63a7\u7684\u5378\u8f7d\u811a\u6b65\u3002\u6267\u884c\u4ee5\u540e\u9762\u677f\u5c31\u770b\u4e0d\u5230 CPU \u72b6\u6001\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734967\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yanzhiling2001 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dengshen #12 \u6211\u76f4\u63a5 DD \u65b0\u7cfb\u7edf\u3002\u80af\u5b9a\u8fd8\u6709\u5176\u4ed6\u7684\u5185\u90e8\u76d1\u63a7\u624b\u6bb5\u3002\u4e0d\u5982\u6362\u4e2a\u65b0\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734968\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dengshen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanzhiling2001 \u8c22\u8c22\u3002\u8fd8\u6ca1\u8bd5\u8fc7 dd \u8fd9\u4e2a\u64cd\u4f5c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5734969\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tomychen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6539 \/etc\/profile #6 \u7ed9\u4e86<br \/>patch bash<\/p>\n<p>https:\/\/github.com\/iamseth\/bash-syslog\/blob\/master\/bash-3.2-syslog.patch                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4ec0\u4e48\u529e\u6cd5\u8bb0\u5f55\u4e0b Linux \u6267\u884c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/426985"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=426985"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/426985\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426985"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}