{"id":256945,"date":"2022-11-30T09:34:02","date_gmt":"2022-11-30T01:34:02","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=256945"},"modified":"2022-11-07T08:34:12","modified_gmt":"2022-11-07T00:34:12","slug":"linux-share-skill","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-share-skill.html","title":{"rendered":"\u5206\u4eab\u4e00\u6761history\u547d\u4ee4\u5c0f\u6280\u5de7"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u73b0\u5728\u719f\u7ec3\u4f7f\u7528Linux\u5df2\u7ecf\u6210\u4e3aIT\u4eba\u5458\u7684\u5fc5\u5907\u6280\u80fd\u4e86\uff0c\u5b66\u4f1a\u4e00\u4e9b\u4f7f\u7528\u5c0f\u6280\u5de7\uff0c\u80fd\u5e2e\u52a9\u60a8\u66f4\u597d\u7684\u4f7f\u7528Linux\u7cfb\u7edf\uff0c\u4eca\u5929\u5c31\u6765\u4ecb\u7ecd\u4e00\u756a\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u5728\u4f7f\u7528linux\u7ec8\u7aef\u6267\u884cbash\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u600e\u4e48\u6ca1\u6709\u65f6\u95f4\u6807\u8bc6\u5462\uff0c\u8fd9\u4ee5\u540e\u8fd8\u600e\u4e48\u67e5\u662f\u54ea\u5929\u6267\u884c\u4e86\u90a3\u6761\u547d\u4ee4\u5462\u3002\u8fd9\u4e2ahistory\u7684\u4f5c\u7528\u5c31\u662f\u5c06bash\u6267\u884c\u8fc7\u7684\u6240\u6709\u547d\u4ee4\u5b58\u50a8\u5230.bash_history\u6587\u4ef6\u4e2d\uff0c\u5e2e\u52a9\u590d\u67e5\u7528\u6237\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4f7f\u7528history\u786e\u5b9e\u662f\u4e0d\u4f1a\u8f93\u51fa\u547d\u4ee4\u6267\u884c\u7684\u65f6\u95f4\u548c\u65e5\u671f\uff0c\u5c3d\u7ba1\u8fd9\u4e2a\u547d\u4ee4\u8bb0\u5f55\u5f97\u5230\u65f6\u95f4\u3002\u8fd0\u884chistory\u547d\u4ee4\u7684\u65f6\u5019\uff0c\u4f1a\u68c0\u67e5\u4e00\u4e2aHISTIMEFORMAT\u7684\u73af\u5883\u53d8\u91cf\uff0c\u8fd9\u4e2a\u53d8\u91cf\u5236\u5b9a\u4e86\u600e\u4e48\u53bb\u683c\u5f0f\u5316\u8f93\u51fa\u8fd9\u4e2a\u547d\u4ee4\u4e2d\u5b58\u50a8\u7684\u65f6\u95f4\uff0c\u5982\u679c\u8fd9\u4e2a\u503c\u4e3anull\uff0c\u90a3\u5c31\u662f\u9ed8\u8ba4\u4e0d\u663e\u793a\u3002\u73b0\u5728\u4f7f\u7528strftime\u683c\u5f0f\u5316\u65f6\u95f4\uff0c\u6709\u4e09\u79cd\u65b9\u5f0f\uff1a<\/p>\n \uff081\uff09\u4e34\u65f6\u8bbe\u7f6eHISTIMEFORMAT\u53d8\u91cf\uff0c\u5728\u4e0b\u6b21\u673a\u5668\u91cd\u542f\u524d\u751f\u6548<\/p>\n # export HISTIMEFROMAT=\u2018%F %T\u2019<\/pre>\n |