{"id":281799,"date":"2023-09-02T04:02:05","date_gmt":"2023-09-01T20:02:05","guid":{"rendered":"https:\/\/lrxjmw.cn\/zsdrhzkwjktd.html"},"modified":"2023-09-02T04:02:05","modified_gmt":"2023-09-01T20:02:05","slug":"zsdrhzkwjktd","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/zsdrhzkwjktd.html","title":{"rendered":"\uff08\u77e5\u8bc6\u70b9\uff09\u5982\u4f55\u67e5\u770b\u6587\u4ef6\u5f00\u5934\u7684\u5185\u5bb9\uff1f"},"content":{"rendered":"

\u6587\u4ef6\u76ee\u5f55<\/p>\n

1\u3001\u67e5\u770b\u6587\u4ef6\u5185\u5bb9<\/p>\n

\u2460cat\u67e5\u770b\u53ca\u5408\u5e76<\/p>\n

\u547d\u4ee4<\/a>\uff1acat<\/p>\n

\u4f5c\u7528\uff1a\u67e5\u770b\u6587\u4ef6\u5185\u5bb9<\/p>\n

\u53e5\u578b\uff1a#cat\u6587\u4ef6\u540d\u79f0<\/p>\n

#cat\u6587\u4ef61\u6587\u4ef62>\u6587\u4ef63<\/p>\n

\u7528\u6cd5\u4e00\uff1acat\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#cat1.txt<\/p>\n

\u6db5\u4e49\uff1a\u663e\u793a1.txt\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n

\u975e\u5e38\u6ce8\u610f\uff1acat\u547d\u4ee4\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u65f6linux\u8ffd\u52a0\u6587\u4ef6<\/strong>\uff0c\u4e0d\u8bba\u6587\u4ef6\u5185\u5bb9\u6709\u591a\u5c11\uff0c\u5c31\u4f1a\u4e00\u6b21\u6027\u663e\u793a\u3002\u5047\u5982\u6587\u4ef6\u7279\u522b\u5927\uff0c\u8fd9\u4e48\u6587\u4ef6\u5f00\u5934\u7684\u5185\u5bb9\u5c31\u770b\u4e0d\u5230\u4e86\u3002cat\u547d\u4ee4\u9002\u5b9c\u67e5\u770b\u4e0d\u592a\u5927\u7684\u6587\u4ef6\u3002<\/p>\n

\u7528\u6cd5\u4e8c\uff1acat\u6587\u4ef61\u6587\u4ef62>\u6587\u4ef63<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#cat1.txt2.txt>3.txt<\/p>\n

\u6db5\u4e49\uff1a\u5c061.txt\u548c2.txt\u6587\u4ef6\u5185\u5bb9\u5408\u5e76\u540e\uff0c\u8f93\u51fa\u52303.txt<\/p>\n

\u2461more\u5206\u5c4f\u663e\u793a\u6587\u4ef6<\/p>\n

\u547d\u4ee4\uff1amore<\/p>\n

\u4f5c\u7528\uff1a\u5206\u5c4f\u67e5\u770b\u6587\u4ef6<\/p>\n

\u53e5\u578b\uff1a#more\u6587\u4ef6\u540d<\/p>\n

\u6d41\u7a0b\uff1amore\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0c\u9ed8\u8ba4\u65e9\u5df2\u52a0\u8f7d\u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n

\u7528\u6cd5\u4e00\uff1amore\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#more\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u5206\u9875\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n

more\u547d\u4ee4\u7684\u6267\u884c\u4f1a\u6253\u5f00\u4e00\u4e2a\u4ea4\u4e92\u754c\u9762\uff0c\u4e0b\u8fb9\u662f\u4e00\u4e9b\u5e38\u7528\u4ea4\u4e92\u547d\u4ee4\uff1a<\/p>\n

\u56de\u8f66\u952e\uff1a\u5411\u4e0a\u8054\u901a\u4e00\u884c<\/p>\n

d\uff1a\u5411\u4e0a\u8054\u901a\u534a\u9875<\/p>\n

\u7a7a\u683c\u952e\uff1a\u5411\u4e0a\u8054\u901a\u4e00\u9875<\/p>\n

b\uff1a\u5411\u4e0b\u8054\u901a\u4e00\u9875<\/p>\n

\/\u5b57\u7b26\u4e32\uff1a\u641c\u7d22\u6307\u5b9a\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n

:f\uff1a\u663e\u793a\u5f53\u524d\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u548c\u884c\u53f7<\/p>\n

q\u6216Q\uff1a\u9000\u51famore<\/p>\n

linux\u8ffd\u52a0\u6587\u4ef6_\u8ffd\u52a0\u6587\u4ef6\u662f\u4ec0\u4e48\u610f\u601d<\/p>\n

\u2462less\u5206\u5c4f\u663e\u793a\u6587\u4ef6<\/p>\n

\u547d\u4ee4\uff1aless<\/p>\n

\u4f5c\u7528\uff1a\u5206\u5c4f\u67e5\u770b\u6587\u4ef6<\/p>\n

\u53e5\u578b\uff1a#less\u6587\u4ef6\u540d<\/p>\n

\u6d41\u7a0b\uff1a\u4e0d\u662f\u52a0\u8f7d\u6574\u4e2a\u6587\u4ef6\uff0c\u800c\u662f\u4e00\u70b9\u4e00\u70b9\u8fdb\u884c\u52a0\u8f7d\uff0c\u76f8\u5bf9\u800c\u8a00\uff0c\u8bfb\u53d6\u5927\u6587\u4ef6\u65f6\uff0c\u6548\u7387\u6bd4\u8f83\u9ad8\u3002<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a\u4f7f\u7528less\u547d\u4ee4\u67e5\u770b\/var\/log\/boot.log\u7684\u6587\u4ef6\u5185\u5bb9<\/p>\n

\u7528\u6cd5\u4e00\uff1aless\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#less\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u5206\u9875\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n

less\u547d\u4ee4\u7684\u6267\u884c\u4e5f\u4f1a\u6253\u5f00\u4e00\u4e2a\u4ea4\u4e92\u754c\u9762\uff0c\u4e0b\u8fb9\u662f\u4e00\u4e9b\u5e38\u7528\u4ea4\u4e92\u547d\u4ee4(\u548cmore\u76f8\u540c)\uff1a<\/p>\n

\u56de\u8f66\u952e\uff1a\u5411\u4e0a\u8054\u901a\u4e00\u884c<\/p>\n

d\uff1a\u5411\u4e0a\u8054\u901a\u534a\u9875<\/p>\n

\u7a7a\u683c\u952e\uff1a\u5411\u4e0a\u8054\u901a\u4e00\u9875<\/p>\n

b\uff1a\u5411\u4e0b\u8054\u901a\u4e00\u9875<\/p>\n

\/\u5b57\u7b26\u4e32\uff1a\u641c\u7d22\u6307\u5b9a\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n

:f\uff1a\u663e\u793a\u5f53\u524d\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u548c\u884c\u53f7<\/p>\n

q\u6216Q\uff1a\u9000\u51famore<\/p>\n

cat,more,less\u4e24\u8005\u7684\u5bf9\u6bd4<\/p>\n

cat<\/p>\n

more<\/p>\n

less<\/p>\n

\u4f5c\u7528<\/p>\n

\u663e\u793a\u5c0f\u6587\u4ef6\u5185\u5bb9\u663e<\/p>\n

\u663e\u793a\u5927\u6587\u4ef6\u5185\u5bb9\u663e<\/p>\n

\u663e\u793a\u5927\u6587\u4ef6\u5185\u5bb9\u663e<\/p>\n

\u4ea4\u4e92\u547d\u4ee4<\/p>\n

\u65e0<\/p>\n

\u6709<\/p>\n

\u6709<\/p>\n

\u4e0a\u4e0b\u952e\u7ffb\u884c<\/p>\n

\u65e0<\/p>\n

\u65e0<\/p>\n

linux\u8ffd\u52a0\u6587\u4ef6_\u8ffd\u52a0\u6587\u4ef6\u662f\u4ec0\u4e48\u610f\u601d<\/p>\n

\u6709<\/p>\n

\u2463head\u663e\u793a\u6587\u4ef6\u5f00\u5934<\/p>\n

\u547d\u4ee4\uff1ahead<\/p>\n

\u4f5c\u7528\uff1a\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u524dn\u884c\uff0c\u5047\u82e5\u4e0d\u6307\u5b9an\uff0c\u5219\u9ed8\u8ba4\u663e\u793a\u524d10\u884c\u3002<\/p>\n

\u53e5\u578b\uff1a#head[\u53c2\u6570\u9009\u9879]\u6587\u4ef6\u540d<\/p>\n

\u5e38\u89c1\u53c2\u6570\uff1a-n\u8868\u793a\u663e\u793a\u524dn\u884c\u7684\u5185\u5bb9\uff0cn\u7b49\u4e8e\u884c\u6570<\/p>\n

\u7528\u6cd5\u4e00\uff1ahead\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

head\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u524d10\u884c<\/p>\n

\u7528\u6cd5\u4e8c\uff1ahead-n\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

head-3\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u524d3\u884c\u5185\u5bb9<\/p>\n

\u2464tail\u663e\u793a\u6587\u4ef6\u7ed3\u5c3e(\u91cd\u70b9)<\/p>\n

\u547d\u4ee4\uff1atail<\/p>\n

\u4f5c\u7528\uff1a\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u6700\u540en\u884c\uff0c\u5047\u5982n\u4e0d\u6307\u5b9a\u9ed8\u8ba4\u663e\u793a\u6700\u540e10\u884c<\/p>\n

\u53e5\u578b\uff1a#tail-n\u6587\u4ef6\u8def\u5f84\u3010n\u8868\u793a\u6570\u5b57\u3011<\/p>\n

\u5e38\u89c1\u53c2\u6570\uff1a<\/p>\n

-n\u663e\u793a\u6700\u540en\u884c\u7684\u5185\u5bb9\uff0cn\u7b49\u4e8e\u884c\u6570<\/p>\n

-f\u8f93\u51fa\u6587\u4ef6\u53d8\u5316\u540e\u65b0\u964d\u4f4e\u7684\u6570\u636e<\/p>\n

\u7528\u6cd5\u4e00\uff1atail\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#tail\/var\/log\/boot.log<\/p>\n

\u542b\u610f\uff1a\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u6700\u540e10\u884c<\/p>\n

\u7528\u6cd5\u4e8c\uff1atail-n\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#tail-5\/var\/log\/boot.log<\/p>\n

\u542b\u610f\uff1a\u663e\u793a\/var\/log\/boot.log\u6587\u4ef6\u7684\u6700\u540e5\u884c\u5185\u5bb9<\/p>\n

\u7528\u6cd5\u4e09\uff1atail-f\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#tail-f\/var\/log\/messages<\/p>\n

\u542b\u610f\uff1a\u663e\u793a\/var\/log\/messages\u6587\u4ef6\u4e2d\uff0c\u6267\u884ctail-f\u547d\u4ee4\u540e\uff0c\u65b0\u589e\u7684\u6570\u636e\u3002<\/p>\n

\u6ce8\u610f\uff1a\u4f5c\u7528\u76f8\u5f53\u4e8e\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u52a8\u6001\u53d8\u5316\u7684\u5185\u5bb9\uff0c\u901a\u5e38\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf<\/a>\u7684\u65e5\u5fd7\u7684\u53d8\u5316\u6309\u4e0bctrl+c\u53ef\u4ee5\u9000\u51fa\u67e5\u770b\u72b6\u6001<\/p>\n

\u6ce8\u610f\uff1actrl+c\u952e\uff0c\u5728\u547d\u4ee4\u884c\u4e2dc\u4e0d\u518d\u8868\u793acopy\uff0c\u800c\u8868\u793acancel(\u53d6\u6d88)\uff0c\u5728\u7a0b\u5e8f\u6267\u884c\u8fc7\u7a0b\u4e2dlinux\u8ffd\u52a0\u6587\u4ef6<\/strong>\uff0c\u4e00\u822c\u90fd\u53ef\u4ee5\u4f7f\u7528ctrl+c\u6765\u4e2d\u6b62\u7a0b\u5e8f\u8fd0\u884c\u6216\u5219\u9000\u51fa\u7a0b\u5e8f<\/p>\n

2\u3001\u7edf\u8ba1\u6587\u4ef6\u4fe1\u606f<\/p>\n

\u2460wc\u7edf\u8ba1\u6587\u4ef6\u5185\u5bb9\u6570\u76ee<\/p>\n

\u547d\u4ee4\uff1awc\uff0cwc=wordcount<\/p>\n

\u4f5c\u7528\uff1a\u7528\u4e8e\u7edf\u8ba1\u6587\u4ef6\u5185\u5bb9\u4fe1\u606f(\u5305\u542b\u884c\u6570\u3001\u5355\u8bcd\u6570\u3001\u5b57\u8282\u6570)<\/p>\n

\u53e5\u578b\uff1a#wc[\u53c2\u6570\u9009\u9879]\u6587\u4ef6\u540d<\/p>\n

\u5e38\u89c1\u53c2\u6570\uff1a<\/p>\n

-l\uff1a\u8868\u793alines\uff0c\u884c\u6570(\u4ee5\u56de\u8f66\/\u6362\u884c\u7b26\u4e3a\u6807\u51c6)<\/p>\n

-w\uff1a\u8868\u793awords\uff0c\u8bcd\u7ec4\u6570\u6839\u636e\u7a7a\u683c\u6765\u5224\u5b9a\u8bcd\u7ec4\u6570\u76ee<\/p>\n

-c\uff1a\u8868\u793abytes\uff0c\u5b57\u8282\u6570(\u7a7a\u683c\uff0c\u56de\u8f66\uff0c\u6362\u884c)<\/p>\n

\u7528\u6cd5\u4e00\uff1awc-lwc\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#wc-lwc\/var\/log\/boot.log<\/p>\n

\u542b\u610f\uff1a\u7edf\u8ba1\/var\/log\/boot.log\u6587\u4ef6\u7684\u884c\u6570linux\u624b\u673a\uff0c\u8bcd\u7ec4\u6570\uff0c\u5b57\u8282\u6570<\/p>\n

\u6ce8\u610f\uff1awc\u547d\u4ee4\u9009\u9879\u53ef\u4ee5\u6df7\u5728\u4e00\u8d77\u642d\u914d\u4f7f\u7528\uff0c\u4f46\u9009\u9879\u7684\u6b21\u5e8f\u4e0d\u5f71\u54cd\u8f93\u51fa\u7ed3\u679c\uff0c\u7b2c\u4e00\u4e2a\u662f\u884c\u6570\uff0c\u7b2c\u4e8c\u4e2a\u662f\u8bcd\u7ec4\u6570\uff0c\u7b2c\u4e09\u4e2a\u6570\u5b57\u8282\u6570\u3002<\/p>\n

\u2461du\u7edf\u8ba1\u6587\u4ef6\u5927\u5c0f<\/p>\n

\u547d\u4ee4\uff1adu<\/p>\n

\u4f5c\u7528\uff1a\u67e5\u770b\u6587\u4ef6\u6216\u76ee\u5f55(\u4f1a\u9012\u5f52\u663e\u793a\u5b50\u76ee\u5f55)\u5360\u7528c\u76d8\u7a7a\u95f4\u5927\u5c0f<\/p>\n

\u53e5\u578b\uff1a#du[\u53c2\u6570\u9009\u9879]\u6587\u4ef6\u540d\u6216\u76ee\u5f55\u540d<\/p>\n

\u5e38\u89c1\u53c2\u6570\uff1a<\/p>\n

-s\uff1asummaries\uff0c\u53ea\u663e\u793a\u6c47\u603b\u7684\u5927\u5c0f\uff0c\u7edf\u8ba1\u6587\u4ef6\u5939\u7684\u5927\u5c0f<\/p>\n

-h\uff1a\u8868\u793a\u4ee5\u9ad8\u53ef\u8bfb\u6027\u7684\u65b9\u5f0f\u8fdb\u884c\u663e\u793a\uff0c\u5047\u82e5\u4e0d\u5199-h\uff0c\u9ed8\u8ba4\u4ee5KB\u7684\u65b9\u5f0f\u663e\u793a\u6587\u4ef6\u5927\u5c0f<\/p>\n

\u7528\u6cd5\u4e00\uff1adu\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#du\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u7edf\u8ba1\/var\/log\/boot.log\u6587\u4ef6\u7684\u5927\u5c0f<\/p>\n

\u7528\u6cd5\u4e8c\uff1adu-h\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#du-h\/var\/log\/boot.log<\/p>\n

\u6db5\u4e49\uff1a\u7edf\u8ba1\/var\/log\/boot.log\u6587\u4ef6\u7684\u5927\u5c0f,\u4ee5\u9ad8\u53ef\u8bfb\u6027\u663e\u793a<\/p>\n

linux\u8ffd\u52a0\u6587\u4ef6_\u8ffd\u52a0\u6587\u4ef6\u662f\u4ec0\u4e48\u610f\u601d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a\u7edf\u8ba1\/var\/log\u76ee\u5f55\u5927\u5c0f<\/p>\n

\u7528\u6cd5\u4e09\uff1adu\u76ee\u5f55\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#du\/var\/log\/<\/p>\n

\u542b\u610f\uff1a\u7edf\u8ba1\/var\/log\/\u76ee\u5f55\u7684\u5927\u5c0f\uff0c\u5305\u542b\u76ee\u5f55\u4e0b\u6bcf\u4e00\u4e2a\u5355\u72ec\u6587\u4ef6\u7684\u5927\u5c0f<\/p>\n

\u7528\u6cd5\u56db\uff1adu-s\u76ee\u5f55\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#du-s\/var\/log\/<\/p>\n

\u542b\u610f\uff1a\u7edf\u8ba1\/var\/log\/boot.log\u6587\u4ef6\u7684\u5927\u5c0f,\u6c47\u603b\u53ea\u663e\u793a\u76ee\u5f55\u5927\u5c0f<\/p>\n

\u7528\u6cd5\u4e94\uff1adu-sh\u76ee\u5f55\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#du-sh\/var\/log\/<\/p>\n

\u542b\u610f\uff1a\u7edf\u8ba1\/var\/log\/boot.log\u6587\u4ef6\u7684\u5927\u5c0f,\u6c47\u603b\u53ea\u663e\u793a\u76ee\u5f55\u5927\u5c0f,\u5e76\u91c7\u7528\u9ad8\u53ef\u8bfb\u6027<\/p>\n

3\u3001\u6587\u672c\u5904\u7406<\/p>\n

\u2460find\u6587\u4ef6\u67e5\u627e(\u91cd\u70b9)<\/p>\n

\u547d\u4ee4\uff1afind<\/p>\n

\u4f5c\u7528\uff1a\u7528\u4e8e\u67e5\u627e\u6587\u6863(\u5176\u9009\u9879\u670955\u4e2a\u4e4b\u591a)<\/p>\n

\u53e5\u578b\uff1a#find\u8def\u5f84\u8303\u56f4\u9009\u98791\u9009\u98791\u7684\u503c[\u9009\u98792\u9009\u98792\u7684\u503c\u2026]<\/p>\n

\u5e38\u7528\u53c2\u6570\uff1a<\/p>\n

-name\uff1a\u6839\u636e\u6587\u6863\u540d\u79f0\u8fdb\u884c\u641c\u7d22(\u652f\u6301\u6a21\u7cca\u641c\u7d22)<\/p>\n

*\uff1a\u952e\u503c\u7ea2\u65d7linux\u4e0b\u8f7d\uff0c\u5339\u914d\u4efb\u610f\u4e2a\u4efb\u610f\u5b57\u7b26<\/p>\n

-type\uff1a\u6839\u636e\u6587\u6863\u7684\u7c7b\u578b\u8fdb\u884c\u641c\u7d22<\/p>\n

\u6587\u6863\u7c7b\u578b\u7684\u503c\uff1a\"-\"\u8868\u793a\u6587\u4ef6\uff08\u5728\u4f7f\u7528find\u7684\u65f6\u4faf\u987b\u8981\u7528f\u6765\u66ff\u6362\uff09\uff0c\"d\"\u8868\u793a\u6587\u4ef6\u5939<\/p>\n

\u7528\u6cd5\u4e00\uff1afind\u8def\u5f84\u8303\u56f4\u9009\u98791\u9009\u98791\u7684\u503c\u9009\u98792\u9009\u98792\u7684\u503c<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#find\/var\/-nameboot.log-typef<\/p>\n

\u542b\u610f\uff1a\u5728\/var\/\u76ee\u5f55\u4e0b\uff0c\u67e5\u627e\u540d\u79f0\u7b49\u4e8eboot.log\uff0c\u7c7b\u578b\u662f\u6587\u4ef6\u7684\u6587\u6863<\/p>\n

\u7528\u6cd5\u4e8c\uff1afind\u8def\u5f84\u8303\u56f4\u9009\u98791\u9009\u98791\u7684\u503c\u4f7f\u7528\u8f6c\u4e49\u9009\u98792\u9009\u98792\u7684\u503c<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#find\/var\/log-name\"*.log\"-typef<\/p>\n

\u542b\u610f\uff1a\u5728\/var\/log\u76ee\u5f55\u4e0b\uff0c\u67e5\u627e\u6240\u6709.log\u7ed3\u5c3e\uff0c\u7c7b\u578b\u662f\u6587\u4ef6\u7684\u6587\u6863\uff0c*.log\u987b\u8981\u7528\u5192\u53f7\u9020\u6210\u6765\u3002<\/p>\n

\u7528\u6cd5\u4e00\uff1afind\u8def\u5f84\u8303\u56f4\u9009\u98791\u9009\u98791\u7684\u503c<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#find\/var\/log-typed<\/p>\n

\u542b\u610f\uff1a\u5728\/var\/log\u76ee\u5f55\u4e0b\uff0c\u67e5\u627e\u6240\u6709\u6587\u4ef6\u5939<\/p>\n

\u2461grep\u641c\u7d22\u6587\u4ef6\u5185\u5bb9(\u91cd\u8981)<\/p>\n

\u547d\u4ee4\uff1agrep<\/p>\n

\u4f5c\u7528\uff1a\u5728\u6587\u4ef6\u4e2d\u76f4\u63a5\u627e\u5230\u5305\u542b\u6307\u5b9a\u4fe1\u606f\u7684\u8fd9\u4e9b\u884c\uff0c\u5e76\u628a\u8fd9\u79cd\u4fe1\u606f\u663e\u793a\u4e0b\u6765<\/p>\n

\u53e5\u578b\uff1a#grep\u8981\u67e5\u627e\u7684\u5185\u5bb9\u6587\u4ef6\u540d<\/p>\n

\u7528\u6cd5\u4e00\uff1agrep\u67e5\u627e\u7684\u5185\u5bb9\u6587\u4ef6\u540d<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#grepnetworkboot.log<\/p>\n

\u542b\u610f\uff1a\u5728boot.log\u6587\u4ef6\u4e2d\uff0c\u67e5\u627e\u5305\u542bnetwork\u7684\u884c<\/p>\n

\u7528\u6cd5\u4e8c\uff1agrep\u67e5\u627e\u7684\u5185\u5bb9\u591a\u4e2a\u6587\u4ef6<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#grepnetwork\/var\/log\/*<\/p>\n

\u542b\u610f\uff1a\u5728\/var\/log\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u4e2d\uff0c\u67e5\u627e\u5305\u542bnetwork\u7684\u884c<\/p>\n

\u2462\u8f93\u51fa\u91cd\u5b9a\u5411<\/p>\n

\u573a\u666f\uff1a\u901a\u5e38\u547d\u4ee4\u7684\u8f93\u51fa\u5c31\u4f1a\u663e\u793a\u5728\u7ec8\u7aef\u4e2d\uff0c\u6709\u4e9b\u65f6\u4faf\u987b\u8981\u5c06\u4e00\u4e9b\u547d\u4ee4\u7684\u6267\u884c\u7ed3\u679c\u60f3\u8981\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u8fdb\u884c\u540e\u7eed\u7684\u5256\u6790\/\u7edf\u8ba1\uff0c\u5219\u8fd9\u65f6\u4faf\u987b\u8981\u4f7f\u7528\u5230\u7684\u8f93\u51fa\u91cd\u5b9a\u5411\u6280\u672f\u3002<\/p>\n

>\uff1a\u6807\u51c6\u8f93\u51fa\u91cd\u5b9a\u5411:\u8986\u76d6\u8f93\u51fa\uff0c\u4f1a\u8986\u76d6\u6389\u539f\u672c\u7684\u6587\u4ef6\u5185\u5bb9<\/p>\n

>>\uff1a\u8ffd\u52a0\u91cd\u5b9a\u5411:\u8ffd\u52a0\u8f93\u51fa\uff0c\u4e0d\u4f1a\u8986\u76d6\u539f\u59cb\u6587\u4ef6\u5185\u5bb9\uff0c\u4f1a\u5728\u539f\u59cb\u5185\u5bb9\u672b\u5c3e\u7ee7\u7eed\u6dfb\u52a0<\/p>\n

\u53e5\u578b\uff1a#\u6709\u8f93\u51fa\u7684\u547d\u4ee4\u91cd\u5b9a\u5411\u7b26\u53f7\u6587\u4ef6\u540d<\/p>\n

\u7528\u6cd5\u4e00\uff1a\u4f7f\u7528>\u8fdb\u884c\u8986\u76d6\u8f93\u51fa<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#11>llroot.txt<\/p>\n

\u542b\u610f\uff1a\u5c06ll\u547d\u4ee4\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u5199\u5165\u5230llroot.txt\u6587\u4ef6\u4e2d\uff0c\u5047\u5982llroot.txt\u6587\u4ef6\u4e2d\u6709\u5176\u4ed6\u5185\u5bb9\uff0c\u5219\u5148\u6e05\u7a7a\uff0c\u5728\u5199\u5165<\/p>\n

\u6ce8\u610f\uff1a\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u6587\u4ef6\u53ef\u4ee5\u662f\u4e0d\u5b58\u5728\u7684\u6587\u4ef6\uff0c\u6bd4\u5982llroot.txt\u53ef\u4ee5\u4e0d\u5b58\u5728\uff0c\u6267\u884c\u547d\u4ee4\u65f6\u4f1a\u624b\u52a8\u521b\u5efa\u8fd9\u4e2a\u6587\u4ef6<\/p>\n

\u7528\u6cd5\u4e8c\uff1a\u4f7f\u7528>>\u8fdb\u884c\u8ffd\u52a0\u8f93\u51fa<\/p>\n

\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n

#11>>llroot.txt<\/p>\n

\u542b\u610f\uff1a\u5c06ll\u547d\u4ee4\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u8ffd\u52a0\u5199\u5165\u5230llroot.txt\u6587\u4ef6\u4e2d<\/p>\n

\u6ce8\u610f\uff1a\u6587\u4ef6\u8def\u5f84\u4e2d\u7684\u6587\u4ef6\u53ef\u4ee5\u662f\u4e0d\u5b58\u5728\u7684\u6587\u4ef6\uff0c\u6bd4\u5982llroot.txt\u53ef\u4ee5\u4e0d\u5b58\u5728\uff0c\u6267\u884c\u547d\u4ee4\u65f6\u4f1a\u624b\u52a8\u521b\u5efa\u8fd9\u4e2a\u6587\u4ef6<\/p>\n","protected":false},"excerpt":{"rendered":"

\u547d\u4ee4\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u65f6\uff0c\u4e0d\u8bba\u6587\u4ef6\u5185\u5bb9\u6709\u591a\u5c11\uff0c\u90fd\u4f1a\u4e00\u6b21\u6027\u663e\u793a\u3002\u6d41\u7a0b\uff1amore\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0c\u9ed8\u8ba4\u5df2\u7ecf\u52a0\u8f7d\u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\u3002log\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u524d10\u884clog\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u6700\u540e10\u884clog\u6587\u4ef6\u4e2d\uff0c\u67e5\u627e\u5305\u542bnetwork\u7684\u884c\u542b\u4e49\uff1a\u5728\/var\/log\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u4e2d\uff0c\u67e5\u627e\u5305\u542bnetwork\u7684\u884ctxt\u53ef\u4ee5\u4e0d\u5b58\u5728\uff0c\u6267\u884c\u547d\u4ee4\u65f6\u4f1a\u81ea\u52a8\u521b\u5efa\u8fd9\u4e2a\u6587\u4ef6\u542b\u4e49\uff1a\u5c06ll\u547d\u4ee4\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u8ffd\u52a0\u5199\u5165\u5230llroot.txt\u53ef\u4ee5\u4e0d\u5b58\u5728\uff0c\u6267\u884c\u547d\u4ee4\u65f6\u4f1a\u81ea\u52a8\u521b\u5efa\u8fd9\u4e2a\u6587\u4ef6<\/p>\n","protected":false},"author":1,"featured_media":281800,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-281799","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/281799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=281799"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/281799\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/281800"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=281799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=281799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=281799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}