{"id":119257,"date":"2026-10-29T07:09:08","date_gmt":"2026-10-28T23:09:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/119257.html"},"modified":"2026-10-29T07:09:08","modified_gmt":"2026-10-28T23:09:08","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%a3%81%e7%9b%98%e7%a9%ba%e9%97%b4%e6%80%8e%e4%b9%88%e7%9c%8b%ef%bc%9fdf-%e5%92%8c-du-%e5%af%b9%e4%b8%8d%e4%b8%8a%e6%97%b6%e7%9a%84%e6%8e%92%e6%9f%a5%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/119257.html","title":{"rendered":"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u6700\u8ba9\u4eba\u56f0\u60d1\u7684\u4e00\u79cd\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u544a\u8b66&#xff0c;\u4e0d\u662f&#034;\u6ee1\u4e86&#034;&#xff0c;\u800c\u662f\u6ee1\u4e86\u5374\u627e\u4e0d\u5230\u662f\u8c01\u5360\u7684\u3002<\/p>\n<p>df \u8bf4\u8fd9\u4e2a\u5206\u533a\u7528\u4e86 95%&#xff0c;\u4f60\u7528 du \u628a\u76ee\u5f55\u6328\u4e2a\u52a0\u8d77\u6765&#xff0c;\u5374\u53d1\u73b0\u6240\u6709\u6587\u4ef6\u52a0\u8d77\u6765\u624d 40%\u3002\u5269\u4e0b\u7684\u7a7a\u95f4\u53bb\u54ea\u4e86&#xff1f;<\/p>\n<p>\u8fd9\u79cd\u60c5\u51b5\u6211\u9047\u5230\u8fc7\u4e0d\u6b62\u4e00\u6b21\u3002\u5b83\u901a\u5e38\u4e0d\u662f\u8bef\u62a5&#xff0c;\u800c\u662f\u4f60\u6f0f\u770b\u4e86\u4e00\u4e2a\u7ef4\u5ea6\u2014\u2014\u8fd9\u4e24\u4e2a\u547d\u4ee4\u7edf\u8ba1\u7684\u6839\u672c\u4e0d\u662f\u540c\u4e00\u4ef6\u4e8b\u3002<\/p>\n<p>\u4e0b\u9762\u6309\u771f\u5b9e\u6392\u67e5\u987a\u5e8f\u8d70\u4e00\u904d&#xff0c;\u4ece&#034;\u600e\u4e48\u5224\u65ad\u662f\u54ea\u4e00\u7c7b\u6ee1&#034;\u5230&#034;\u5220\u4e86\u6587\u4ef6\u4e3a\u4ec0\u4e48\u7a7a\u95f4\u4e0d\u91ca\u653e&#034;\u3002<\/p>\n<h3>\u4e00\u3001\u5148\u5206\u6e05\u662f\u54ea\u4e00\u7c7b&#034;\u6ee1&#034;<\/h3>\n<p>\u770b\u5230 No space left on device \u6216\u78c1\u76d8\u544a\u8b66&#xff0c;\u7b2c\u4e00\u4ef6\u4e8b\u4e0d\u662f\u53bb\u627e\u5927\u6587\u4ef6&#xff0c;\u800c\u662f\u5224\u65ad\u6ee1\u7684\u662f\u54ea\u79cd\u8d44\u6e90\u3002<\/p>\n<p>\u65e5\u5e38\u5728 linux \u67e5\u770b\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4&#xff0c;\u591a\u6570\u4eba\u53ea\u6572\u4e00\u4e2a df -h \u5c31\u53bb\u627e\u5927\u6587\u4ef6\u4e86&#xff0c;\u7ed3\u679c\u7ecf\u5e38\u767d\u5fd9\u4e00\u573a\u3002\u6b63\u786e\u7684\u505a\u6cd5\u662f\u81f3\u5c11\u540c\u65f6\u770b\u4e24\u4e2a\u6570&#xff1a;<\/p>\n<p><span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-hT<\/span><br \/>\n<span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-i<\/span><\/p>\n<p>df -hT \u770b\u5bb9\u91cf\u548c\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b&#xff0c;df -i \u770b inode\u3002<\/p>\n<p>\u5982\u679c Use% \u63a5\u8fd1 100%&#xff1a;\u8fd9\u662f\u771f\u7684\u7a7a\u95f4\u4e0d\u591f&#xff0c;\u7ee7\u7eed\u5f80\u4e0b\u770b\u7b2c\u4e8c\u8282\u3002<\/p>\n<p>\u5982\u679c Use% \u8fd8\u884c&#xff0c;\u4f46 IUse% \u5230\u4e86 100%&#xff1a;\u8fd9\u662f inode \u8017\u5c3d\u3002\u6bcf\u4e2a\u6587\u4ef6&#xff08;\u542b\u76ee\u5f55\u3001\u786c\u94fe\u63a5&#xff09;\u90fd\u8981\u5360\u4e00\u4e2a inode&#xff0c;\u6587\u4ef6\u6570\u628a inode \u7528\u5149\u4e86&#xff0c;\u54ea\u6015\u8fd8\u5269\u51e0\u5341 GB \u7a7a\u95f4&#xff0c;\u521b\u5efa\u65b0\u6587\u4ef6\u540c\u6837\u4f1a\u62a5 No space left on device\u3002<\/p>\n<p>\u8fd9\u4e24\u8005\u62a5\u9519\u5b8c\u5168\u4e00\u6837&#xff0c;\u89e3\u6cd5\u5b8c\u5168\u4e0d\u540c\u3002inode \u8017\u5c3d\u7684\u5e38\u89c1\u6765\u6e90\u662f\u51e0\u767e\u4e07\u4e2a\u5c0f\u6587\u4ef6&#xff1a;PHP session\u3001\u90ae\u4ef6\u961f\u5217\u3001CI \u6784\u5efa\u4ea7\u7269\u3001\u67d0\u79cd&#034;\u6bcf\u6b21\u8bf7\u6c42\u5199\u4e00\u4e2a\u6587\u4ef6&#034;\u7684\u5e94\u7528 bug\u3002<\/p>\n<p>\u5b9a\u4f4d inode \u5927\u6237&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">find<\/span> \/ <span class=\"token parameter variable\">-xdev<\/span> <span class=\"token parameter variable\">-printf<\/span> <span class=\"token string\">&#039;%h\\\\n&#039;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">uniq<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token parameter variable\">-nr<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-20<\/span><\/p>\n<p>-xdev \u5f88\u5173\u952e\u2014\u2014\u4e0d\u8ba9 find \u8de8\u6587\u4ef6\u7cfb\u7edf\u8dd1&#xff0c;\u5426\u5219\u4f1a\u626b\u5230 \/proc\u3001\/sys \u8fd9\u4e9b\u865a\u62df\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u7ed3\u679c\u5168\u662f\u566a\u97f3\u3002<\/p>\n<p>\u8fd8\u6709\u4e00\u7c7b\u5bb9\u6613\u6f0f\u7684&#xff1a;\/dev\/shm\u3001\/tmp \u8fd9\u7c7b tmpfs \u662f\u5185\u5b58\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u5b83\u4eec\u6ee1\u4e86\u62a5\u7684\u5c31\u662f\u5185\u5b58\u4e0d\u591f&#xff0c;\u4e0d\u662f\u78c1\u76d8\u4e0d\u591f\u3002\u7528 df -h \/tmp \u5355\u72ec\u770b\u4e00\u4e0b\u5c31\u80fd\u533a\u5206\u3002<\/p>\n<h3>\u4e8c\u3001\u627e\u5360\u7528&#xff1a;du \u7684\u6b63\u786e\u7528\u6cd5<\/h3>\n<p>\u786e\u8ba4\u662f\u5bb9\u91cf\u95ee\u9898\u540e&#xff0c;\u5c31\u8be5\u67e5\u6e05\u695a\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u5177\u4f53\u88ab\u54ea\u4e9b\u76ee\u5f55\u5403\u6389\u4e86\u3002\u67e5\u770blinux\u670d\u52a1\u5668\u78c1\u76d8\u5269\u4f59\u7684\u5206\u5e03&#xff0c;\u7528 du \u5b9a\u4f4d\u3002\u6ce8\u610f\u8fd9\u4e24\u4e2a\u53c2\u6570&#xff1a;<\/p>\n<p><span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-xh<\/span> \/ &#8211;max-depth<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token parameter variable\">-rh<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-20<\/span><\/p>\n<ul>\n<li>-x&#xff1a;\u4e0d\u8de8\u6587\u4ef6\u7cfb\u7edf\u3002\/ \u4e0b\u9762\u5f80\u5f80\u6302\u7740\u522b\u7684\u5206\u533a\u751a\u81f3\u7f51\u7edc\u5b58\u50a8&#xff0c;\u4e0d\u52a0 -x \u4f1a\u628a\u6240\u6709\u6302\u8f7d\u70b9\u7684\u7a7a\u95f4\u91cd\u590d\u7b97\u4e00\u904d&#xff0c;\u51fa\u6765\u7684\u6570\u5b57\u5b8c\u5168\u5bf9\u4e0d\u4e0a\u3002<\/li>\n<li>&#8211;max-depth&#xff1a;\u63a7\u5236\u5c42\u7ea7\u3002-x \u914d\u5408 &#8211;max-depth&#061;1 \u5148\u5b9a\u4f4d\u5230\u4e00\u7ea7\u76ee\u5f55&#xff0c;\u7136\u540e\u5bf9\u7740\u6700\u5927\u7684\u90a3\u4e2a\u76ee\u5f55\u518d\u5f80\u4e0b\u94bb&#xff0c;\u6bd4\u4e00\u6b21\u6027 du -sh * \u94fa\u6ee1\u5c4f\u5e55\u6709\u6548\u7387\u3002<\/li>\n<\/ul>\n<p>\u60f3\u4ea4\u4e92\u5f0f\u7684&#xff0c;\u88c5 ncdu&#xff1a;<\/p>\n<p>ncdu <span class=\"token parameter variable\">-x<\/span> \/<\/p>\n<p>\u5b83\u4f1a\u628a\u76ee\u5f55\u6309\u5927\u5c0f\u6392\u597d&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u5728\u754c\u9762\u91cc\u8fdb\u76ee\u5f55\u3001\u5220\u6587\u4ef6\u3002\u751f\u4ea7\u73af\u5883\u6392\u67e5\u65f6\u8fd9\u4e2a\u6bd4\u53cd\u590d\u6572 du \u5feb\u5f97\u591a\u3002<\/p>\n<h3>\u4e09\u3001df \u548c du \u5dee\u5f88\u591a&#xff1a;\u4e09\u4e2a\u771f\u5b9e\u539f\u56e0<\/h3>\n<p>\u8fd9\u662f\u672c\u6587\u6807\u9898\u60f3\u89e3\u51b3\u7684\u95ee\u9898\u3002\u5148\u8bf4\u7ed3\u8bba&#xff1a;\u8fd9\u4fe9\u547d\u4ee4\u7edf\u8ba1\u7684\u53e3\u5f84\u672c\u6765\u5c31\u4e0d\u4e00\u6837&#xff0c;\u5dee\u503c\u4e0d\u53ef\u80fd\u4e25\u683c\u7b49\u4e8e\u96f6\u3002\u771f\u6b63\u9700\u8981\u5904\u7406\u7684&#xff0c;\u662f\u5dee\u503c\u5927\u5230\u51e0\u5341 GB \u7684\u60c5\u51b5\u3002<\/p>\n<p>\u539f\u56e0\u4e00&#xff1a;\u6587\u4ef6\u88ab\u5220\u4e86&#xff0c;\u4f46\u8fdb\u7a0b\u8fd8\u62ff\u7740\u5b83&#xff08;\u6700\u5e38\u89c1&#xff09;<\/p>\n<p>Linux \u4e0b\u5220\u9664\u6587\u4ef6&#xff0c;\u672c\u8d28\u662f\u5728\u76ee\u5f55\u91cc\u53bb\u6389\u4e00\u4e2a\u94fe\u63a5\u3002\u53ea\u8981\u8fd8\u6709\u8fdb\u7a0b\u6301\u6709\u8fd9\u4e2a\u6587\u4ef6\u7684\u53e5\u67c4&#xff0c;inode \u548c\u6570\u636e\u5757\u5c31\u4e0d\u4f1a\u771f\u6b63\u91ca\u653e\u3002<\/p>\n<p>\u4e8e\u662f&#xff1a;<\/p>\n<ul>\n<li>du \u904d\u5386\u76ee\u5f55\u6811&#xff0c;\u770b\u4e0d\u5230\u8fd9\u4e2a\u5df2\u7ecf\u4ece\u76ee\u5f55\u91cc\u6d88\u5931\u7684\u6587\u4ef6 \u2192 \u4e0d\u7edf\u8ba1<\/li>\n<li>df \u8bfb\u6587\u4ef6\u7cfb\u7edf\u8d85\u7ea7\u5757&#xff0c;\u90a3\u5757\u7a7a\u95f4\u786e\u5b9e\u8fd8\u88ab\u5360\u7740 \u2192 \u7edf\u8ba1<\/li>\n<\/ul>\n<p>\u5dee\u503c\u5c31\u662f\u8fd9\u4e48\u6765\u7684\u3002<\/p>\n<p>\u67e5\u8bc1\u5f88\u7b80\u5355&#xff1a;<\/p>\n<p><span class=\"token function\">lsof<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> deleted<br \/>\n<span class=\"token comment\"># \u6216<\/span><br \/>\n<span class=\"token function\">lsof<\/span> &#043;L1<\/p>\n<p>lsof &#043;L1 \u5217\u51fa\u94fe\u63a5\u6570\u5c0f\u4e8e 1 \u7684\u6587\u4ef6&#xff0c;\u4e5f\u5c31\u662f&#034;\u5df2\u4ece\u76ee\u5f55\u5220\u9664\u4f46\u4ecd\u88ab\u6253\u5f00&#034;\u7684\u90a3\u4e9b\u3002\u8f93\u51fa\u91cc\u80fd\u770b\u5230\u8fdb\u7a0b\u540d\u3001PID\u3001\u5360\u7528\u5927\u5c0f\u3002\u5982\u679c\u8fd9\u91cc\u6709\u5927\u6587\u4ef6&#xff0c;df \u548c du \u7684\u5dee\u5c31\u6709\u4e86\u5b8c\u6574\u89e3\u91ca\u3002<\/p>\n<p>\u5173\u4e8e lsof \u7684\u5b8c\u6574\u5b57\u6bb5\u4e0e\u9009\u9879&#xff0c;\u53ef\u67e5\u9605 lsof(8) \u624b\u518c\u9875\u3002<\/p>\n<p>\u539f\u56e0\u4e8c&#xff1a;\u6302\u8f7d\u70b9\u628a\u539f\u6765\u7684\u6587\u4ef6\u76d6\u4f4f\u4e86<\/p>\n<p>\u505a linux\u670d\u52a1\u5668\u78c1\u76d8\u6302\u8f7d \u65f6\u6709\u4e2a\u5bb9\u6613\u5ffd\u7565\u7684\u987a\u5e8f\u95ee\u9898&#xff1a;\u5982\u679c\u5148\u5f80 \/data \u5199\u4e86 50GB \u6570\u636e&#xff0c;\u4e4b\u540e\u53c8\u628a\u4e00\u5757\u76d8\u6302\u8f7d\u5230 \/data&#xff0c;\u539f\u6765\u7684 50GB \u5c31\u88ab&#034;\u76d6\u4f4f&#034;\u4e86\u2014\u2014du \u904d\u5386\u4e0d\u5230&#xff08;\u88ab\u65b0\u6302\u8f7d\u906e\u853d&#xff09;&#xff0c;\u4f46\u7a7a\u95f4\u5b9e\u5b9e\u5728\u5728\u88ab\u5360\u7740\u3002<\/p>\n<p>\u533a\u5206\u65b9\u6cd5&#xff1a;\u4e34\u65f6 umount \u6389\u8be5\u6302\u8f7d\u70b9&#xff0c;\u518d\u770b\u539f\u76ee\u5f55\u7684\u5927\u5c0f\u3002\u751f\u4ea7\u73af\u5883\u505a\u8fd9\u4e2a\u64cd\u4f5c\u524d\u52a1\u5fc5\u786e\u8ba4\u6ca1\u6709\u670d\u52a1\u6b63\u5728\u8bfb\u5199\u3002<\/p>\n<p>\u539f\u56e0\u4e09&#xff1a;\u53e3\u5f84\u5dee\u5f02\u672c\u8eab<\/p>\n<p>\u8fd9\u4e00\u6761\u4e0d\u662f\u6545\u969c&#xff0c;\u662f\u5fc5\u987b\u77e5\u9053\u7684\u5e38\u8bc6&#xff1a;<\/p>\n<ul>\n<li>df \u7edf\u8ba1\u7684\u662f\u6587\u4ef6\u7cfb\u7edf\u7684\u5757\u4f7f\u7528\u60c5\u51b5&#xff0c;\u5305\u542b\u5143\u6570\u636e\u548c\u4fdd\u7559\u5757<\/li>\n<li>du \u662f\u9010\u4e2a\u6587\u4ef6\u7d2f\u52a0&#xff0c;\u5bf9\u786c\u94fe\u63a5&#xff08;\u53ea\u7b97\u4e00\u6b21&#xff09;\u3001\u7a00\u758f\u6587\u4ef6&#xff08;\u6309\u5b9e\u9645\u5360\u7528\u800c\u975e\u8868\u89c2\u5927\u5c0f&#xff09;\u3001\u65e0\u6743\u9650\u8bfb\u53d6\u7684\u76ee\u5f55&#xff08;\u4f1a\u88ab\u8df3\u8fc7&#xff09;\u8868\u73b0\u90fd\u4e0d\u540c<\/li>\n<\/ul>\n<p>\u6240\u4ee5\u51e0 GB \u7684\u5dee\u5f02\u662f\u6b63\u5e38\u7684\u3002\u53ea\u6709\u5f53\u5dee\u503c\u8fbe\u5230\u51e0\u5341 GB&#xff0c;\u5e76\u4e14\u80fd\u5728 lsof &#043;L1 \u91cc\u627e\u5230\u5bf9\u5e94\u7684 deleted \u6587\u4ef6&#xff0c;\u8bc1\u636e\u94fe\u624d\u7b97\u5b8c\u6574\u3002\u4e0d\u8981\u770b\u5230\u51e0 GB \u5dee\u5c31\u6025\u7740\u91cd\u542f\u670d\u52a1\u3002<\/p>\n<h3>\u56db\u3001\u7a7a\u95f4\u4e0d\u91ca\u653e&#xff1a;\u7528 truncate&#xff0c;\u4e0d\u8981\u7528 rm<\/h3>\n<p>\u8fd9\u662f\u5b9e\u64cd\u91cc\u6700\u5e38\u72af\u7684\u9519\u3002<\/p>\n<p>\u65e5\u5fd7\u6da8\u5230 30GB&#xff0c;\u5f88\u591a\u4eba\u7b2c\u4e00\u53cd\u5e94\u662f&#xff1a;<\/p>\n<p><span class=\"token function\">rm<\/span> \/var\/log\/myapp\/app.log   <span class=\"token comment\"># \u9519\u8bef\u793a\u8303<\/span><\/p>\n<p>\u5220\u5b8c\u4e4b\u540e df \u4e00\u70b9\u6ca1\u53d8\u2014\u2014\u56e0\u4e3a\u5199\u65e5\u5fd7\u7684\u8fdb\u7a0b\u8fd8\u6301\u6709\u8fd9\u4e2a\u6587\u4ef6\u7684\u53e5\u67c4&#xff0c;\u7a7a\u95f4\u4e0d\u4f1a\u91ca\u653e&#xff0c;\u800c\u4e14\u4f60\u8fd8\u5931\u53bb\u4e86\u5bf9\u8fd9\u4e2a\u6587\u4ef6\u7684\u63a7\u5236&#xff08;\u6ca1\u6cd5\u518d\u622a\u65ad\u5b83\u4e86&#xff09;\u3002<\/p>\n<p>\u6b63\u786e\u505a\u6cd5\u662f\u6e05\u7a7a\u800c\u4e0d\u662f\u5220\u9664&#xff0c;inode \u4fdd\u6301\u4e0d\u53d8&#xff0c;\u8fdb\u7a0b\u7ee7\u7eed\u5f80\u91cc\u5199&#xff0c;\u7a7a\u95f4\u7acb\u523b\u91ca\u653e&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u65b9\u5f0f\u4e00<\/span><br \/>\ntruncate <span class=\"token parameter variable\">-s<\/span> <span class=\"token number\">0<\/span> \/var\/log\/myapp\/app.log<\/p>\n<p><span class=\"token comment\"># \u65b9\u5f0f\u4e8c&#xff08;\u6548\u679c\u76f8\u540c&#xff09;<\/span><br \/>\n<span class=\"token operator\">&gt;<\/span> \/var\/log\/myapp\/app.log<\/p>\n<p>\u5982\u679c\u6587\u4ef6\u5df2\u7ecf\u88ab rm \u6389\u4e86&#xff0c;\u8fd8\u80fd\u8865\u6551\u2014\u2014\u901a\u8fc7 \/proc \u627e\u5230\u90a3\u4e2a\u8fd8\u5728\u88ab\u6301\u6709\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;\u76f4\u63a5\u622a\u65ad\u5b83&#xff1a;<\/p>\n<p><span class=\"token comment\"># PID \u548c FD \u4ece lsof &#043;L1 \u7684\u8f93\u51fa\u91cc\u53d6<\/span><br \/>\ntruncate <span class=\"token parameter variable\">-s<\/span> <span class=\"token number\">0<\/span> \/proc\/<span class=\"token variable\">$PID<\/span>\/fd\/<span class=\"token variable\">$FD<\/span><\/p>\n<p>\u8fd9\u6837\u4e0d\u9700\u8981\u91cd\u542f\u3002\u53ea\u6709\u5f53\u62ff\u4e0d\u5230 PID\u3001\u6216\u8005\u60f3\u5f7b\u5e95\u6062\u590d\u5e72\u51c0\u72b6\u6001\u65f6&#xff0c;\u624d\u53bb systemctl restart \u5bf9\u5e94\u670d\u52a1\u2014\u2014\u6ce8\u610f\u662f\u91cd\u542f\u670d\u52a1&#xff0c;\u4e0d\u662f\u91cd\u542f\u6574\u673a\u3002<\/p>\n<p>\u987a\u5e26\u8bf4\u9884\u9632&#xff1a;\u914d\u597d logrotate\u3002copytruncate \u662f\u4e00\u4e2a\u9009\u9879&#xff0c;\u66f4\u89c4\u8303\u7684\u505a\u6cd5\u662f\u8ba9\u7a0b\u5e8f\u5728\u6536\u5230\u4fe1\u53f7\u540e\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6&#xff08;reload hook&#xff09;\u3002\u65e0\u8bba\u54ea\u79cd&#xff0c;\u6838\u5fc3\u662f\u4e0d\u8981\u8ba9&#034;\u5220\u9664&#034;\u6210\u4e3a\u6e05\u7406\u624b\u6bb5\u3002<\/p>\n<h3>\u4e94\u3001\u4e09\u4e2a\u5927\u6237&#xff1a;journal\u3001Docker\u3001\u5305\u7f13\u5b58<\/h3>\n<p>\u6e05\u7406\u8981\u6309\u98ce\u9669\u4ece\u4f4e\u5230\u9ad8\u6765\u3002\u5148\u52a8\u8fd9\u4e9b\u786e\u5b9a\u65e0\u5bb3\u7684&#xff1a;<\/p>\n<p>systemd journal<\/p>\n<p>journalctl &#8211;disk-usage              <span class=\"token comment\"># \u5148\u770b\u5360\u4e86\u591a\u5c11<\/span><br \/>\njournalctl &#8211;vacuum-size<span class=\"token operator\">&#061;<\/span>500M        <span class=\"token comment\"># \u4fdd\u7559 500MB<\/span><br \/>\njournalctl &#8211;vacuum-time<span class=\"token operator\">&#061;<\/span>7d          <span class=\"token comment\"># \u6216\u4fdd\u7559\u6700\u8fd1 7 \u5929<\/span><\/p>\n<p>\u6cbb\u672c\u7684\u505a\u6cd5\u662f\u5728 journald.conf \u91cc\u8bbe SystemMaxUse&#061;&#xff0c;\u5426\u5219\u5b83\u4f1a\u5468\u671f\u6027\u6da8\u56de\u6765\u3002<\/p>\n<p>Docker<\/p>\n<p><span class=\"token function\">docker<\/span> system <span class=\"token function\">df<\/span>                     <span class=\"token comment\"># \u770b\u955c\u50cf\/\u5bb9\u5668\/\u5377\/\u6784\u5efa\u7f13\u5b58\u5404\u5360\u591a\u5c11<\/span><br \/>\n<span class=\"token function\">docker<\/span> system prune <span class=\"token parameter variable\">-f<\/span>               <span class=\"token comment\"># \u6e05\u7406\u505c\u6b62\u7684\u5bb9\u5668\u3001\u65e0\u7528\u7f51\u7edc\u3001\u60ac\u7a7a\u955c\u50cf\u3001\u6784\u5efa\u7f13\u5b58<\/span><br \/>\n<span class=\"token function\">docker<\/span> image prune <span class=\"token parameter variable\">-a<\/span> <span class=\"token parameter variable\">-f<\/span>             <span class=\"token comment\"># \u6e05\u7406\u672a\u88ab\u4efb\u4f55\u5bb9\u5668\u4f7f\u7528\u7684\u955c\u50cf<\/span><\/p>\n<p>\u26a0\ufe0f docker system prune &#8211;volumes \u4f1a\u5220\u6570\u636e&#xff0c;\u4e0d\u53ea\u662f\u5220\u5c42\u3002\u5982\u679c\u6709\u533f\u540d\u5377\u88c5\u7740\u6570\u636e\u5e93\u6587\u4ef6&#xff0c;\u6267\u884c\u524d\u5fc5\u987b\u786e\u8ba4\u3002\u751f\u4ea7\u73af\u5883\u6211\u53ea\u5728\u660e\u786e\u77e5\u9053\u5377\u53ef\u5f03\u65f6\u624d\u52a0\u8fd9\u4e2a\u53c2\u6570\u3002<\/p>\n<p>\u5bb9\u5668\u65e5\u5fd7\u4e5f\u662f\u9690\u5f62\u5927\u6237&#xff0c;\u53ef\u4ee5\u5728 Docker \u914d\u7f6e\u91cc\u9650\u6b7b&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;log-driver&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;json-file&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;log-opts&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string-property property\">&#034;max-size&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;50m&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;max-file&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;3&#034;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5305\u7ba1\u7406\u7f13\u5b58<\/p>\n<p><span class=\"token function\">apt<\/span> clean            <span class=\"token comment\"># Debian\/Ubuntu<\/span><br \/>\ndnf clean all        <span class=\"token comment\"># RHEL \u7cfb<\/span><\/p>\n<h3>\u516d\u3001\u8fd8\u6709\u7a7a\u95f4\u5374\u5199\u4e0d\u8fdb\u53bb&#xff1a;ext4 \u7684\u4fdd\u7559\u5757<\/h3>\n<p>\u6709\u79cd\u60c5\u51b5\u5f88\u8ff7\u60d1&#xff1a;df \u663e\u793a\u8fd8\u5269 5%&#xff0c;\u4f46\u5e94\u7528\u5c31\u662f\u62a5 No space left on device\u3002<\/p>\n<p>\u8fd9\u662f ext4 \u9ed8\u8ba4\u4fdd\u7559\u4e86 5% \u7684\u5757\u7ed9 root&#xff0c;\u76ee\u7684\u662f\u78c1\u76d8\u5199\u6ee1\u65f6\u7ba1\u7406\u5458\u8fd8\u80fd\u767b\u5f55\u6e05\u7406\u3002\u975e root \u8fdb\u7a0b\u5728\u7528\u5230 95% \u65f6\u5c31\u5199\u4e0d\u8fdb\u53bb\u4e86\u2014\u2014\u660e\u660e\u6709\u7a7a\u95f4&#xff0c;\u4f46\u90a3\u90e8\u5206\u4e0d\u662f\u7ed9\u4f60\u7684\u3002<\/p>\n<p>\u67e5\u770b\u4fdd\u7559\u91cf&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> tune2fs <span class=\"token parameter variable\">-l<\/span> \/dev\/sda1 <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#039;reserved block&#039;<\/span><\/p>\n<p>\u6570\u636e\u76d8\u4e0a\u53ef\u4ee5\u8c03\u4f4e&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> tune2fs <span class=\"token parameter variable\">-m<\/span> <span class=\"token number\">1<\/span> \/dev\/sdb1<\/p>\n<p>\u26a0\ufe0f \u4e09\u6761\u9650\u5236\u5fc5\u987b\u77e5\u9053&#xff1a;<\/p>\n<li>\u53ea\u5bf9 ext4 \u751f\u6548\u3002XFS \u6ca1\u6709\u8fd9\u4e2a\u673a\u5236&#xff0c;\u522b\u5bf9\u7740 XFS \u5206\u533a\u6267\u884c\u3002\u4e0d\u786e\u5b9a\u7c7b\u578b\u5c31\u7528 df -hT \u6216 findmnt -n -o SOURCE \/data \u786e\u8ba4\u3002<\/li>\n<li>\u6839\u5206\u533a\u4e0d\u8981\u76f2\u76ee\u8c03\u4f4e\u3002\u90a3 5% \u662f\u7cfb\u7edf\u51fa\u4e8b\u65f6\u4f60\u8fd8\u80fd\u767b\u8fdb\u53bb\u7684\u4fdd\u969c\u3002<\/li>\n<li>\u56de\u6eda\u8981\u5c0f\u5fc3\u3002\u5982\u679c\u8c03\u51fa\u6765\u7684\u7a7a\u95f4\u5df2\u7ecf\u88ab\u4e1a\u52a1\u5199\u6ee1&#xff0c;\u518d\u628a\u4fdd\u7559\u6bd4\u4f8b\u8c03\u56de\u53bb&#xff0c;\u666e\u901a\u7528\u6237\u7684\u53ef\u7528\u7a7a\u95f4\u4f1a\u8fdb\u4e00\u6b65\u4e0b\u964d\u3002<\/li>\n<h3>\u4e03\u3001\u4e00\u4e2a\u53ef\u4ee5\u76f4\u63a5\u7167\u505a\u7684\u6e05\u7406\u987a\u5e8f<\/h3>\n<table>\n<tr>\u987a\u5e8f\u52a8\u4f5c\u98ce\u9669<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>df -hT &#043; df -i \u5224\u5b9a\u662f\u5bb9\u91cf\u8fd8\u662f inode<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>du -xh &#8211;max-depth \u5b9a\u4f4d\u5927\u76ee\u5f55<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>lsof &#043;L1 \u67e5\u5e7d\u7075\u6587\u4ef6<\/td>\n<td>\u65e0<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>journalctl &#8211;vacuum-size<\/td>\n<td>\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>truncate \u6e05\u7a7a\u5927\u65e5\u5fd7&#xff08;\u4e0d\u8981 rm&#xff09;<\/td>\n<td>\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>apt\/dnf clean\u3001\u6e05\u7406\u65e7\u5185\u6838<\/td>\n<td>\u4f4e<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>docker system prune -f<\/td>\n<td>\u4e2d&#xff08;\u522b\u5e26 &#8211;volumes&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u52a8\u5e94\u7528\u6570\u636e<\/td>\n<td>\u9ad8&#xff0c;\u5fc5\u987b\u6709\u5907\u4efd\u6216\u5feb\u7167<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>tune2fs -m \u8c03\u4fdd\u7559\u5757<\/td>\n<td>\u4e2d&#xff08;\u4ec5\u9650 ext4 \u6570\u636e\u76d8&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b2c 8 \u6b65\u4e4b\u524d&#xff0c;\u5148\u95ee\u4e00\u53e5&#xff1a;\u8fd9\u4e9b\u6570\u636e\u5220\u4e86\u80fd\u4e0d\u80fd\u6062\u590d&#xff1f;\u751f\u4ea7\u73af\u5883\u6ca1\u6709\u5feb\u7167\u5c31\u5220\u5e94\u7528\u6570\u636e&#xff0c;\u662f\u628a\u4e00\u6b21\u78c1\u76d8\u544a\u8b66\u53d8\u6210\u4e00\u6b21\u6570\u636e\u4e8b\u6545\u3002<\/p>\n<h3>\u516b\u3001\u4ec0\u4e48\u65f6\u5019\u8be5\u6269\u5bb9&#xff0c;\u800c\u4e0d\u662f\u6e05\u7406<\/h3>\n<p>\u5982\u679c\u505a\u5b8c\u4e0a\u9762\u8fd9\u4e9b&#xff0c;\u7a7a\u95f4\u5728\u5f88\u77ed\u65f6\u95f4\u5185\u53c8\u6da8\u56de\u53bb&#xff0c;\u8bf4\u660e\u8fd9\u4e0d\u662f\u4e00\u6b21\u6e05\u7406\u80fd\u89e3\u51b3\u7684\u95ee\u9898&#xff0c;\u800c\u662f\u5bb9\u91cf\u89c4\u5212\u95ee\u9898\u3002<\/p>\n<p>\u5224\u65ad\u4f9d\u636e\u5f88\u7b80\u5355&#xff1a;\u628a\u6e05\u7406\u6389\u7684\u91cf\u548c\u589e\u957f\u901f\u7387\u505a\u4e2a\u9664\u6cd5\u3002\u6e05\u4e86 30GB\u3001\u4e00\u5468\u540e\u53c8\u6ee1\u4e86&#xff0c;\u90a3\u6269\u5bb9\u6bd4\u53cd\u590d\u6e05\u7406\u5212\u7b97\u2014\u2014\u8fd0\u7ef4\u7684\u65f6\u95f4\u6210\u672c\u4e5f\u662f\u6210\u672c\u3002<\/p>\n<p>\u4e24\u79cd\u6269\u5bb9\u65b9\u5411&#xff1a;<\/p>\n<ul>\n<li>\u7eb5\u5411\u6269&#xff1a;\u76f4\u63a5\u628a\u73b0\u6709\u4e91\u76d8\u6269\u5230\u66f4\u5927&#xff0c;\u591a\u6570\u4e91\u5e73\u53f0\u652f\u6301\u5728\u7ebf\u6269\u5bb9&#xff08;\u4e0d\u505c\u673a\u6269\u76d8&#xff0c;\u4e4b\u540e\u518d\u6269\u5206\u533a\u4e0e\u6587\u4ef6\u7cfb\u7edf&#xff09;\u3002\u5177\u4f53\u6b65\u9aa4\u548c\u9650\u5236\u53c2\u89c1\u4e91\u670d\u52a1\u5668\u5728\u7ebf\u6269\u5bb9\u4e91\u76d8\u6587\u6863\u3002<\/li>\n<li>\u6a2a\u5411\u62c6&#xff1a;\u628a \/var\u3001\u5bb9\u5668\u6570\u636e\u3001\u6570\u636e\u5e93\u62c6\u5230\u72ec\u7acb\u7684\u6570\u636e\u76d8\u4e0a\u3002\u597d\u5904\u662f\u67d0\u4e00\u7c7b\u6570\u636e\u66b4\u6da8\u4e0d\u4f1a\u8fde\u5e26\u628a\u6839\u5206\u533a\u585e\u6ee1\u5bfc\u81f4\u7cfb\u7edf\u767b\u4e0d\u8fdb\u53bb\u2014\u2014\u524d\u9762\u7b2c 1 \u6b65\u91cc&#034;\u6839\u5206\u533a\u6ee1\u4e86&#034;\u662f\u6700\u96be\u5904\u7406\u7684\u4e00\u79cd&#xff0c;\u56e0\u4e3a\u8fde\u6392\u67e5\u5de5\u5177\u90fd\u53ef\u80fd\u5199\u4e0d\u4e86\u4e34\u65f6\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p>\u5bb9\u91cf\u544a\u8b66\u9608\u503c\u4e5f\u5efa\u8bae\u63d0\u524d\u8bbe\u6210 75% \/ 85% \u4e24\u7ea7&#xff0c;\u800c\u4e0d\u662f\u7b49\u5230 98%\u3002\u7b49 98% \u624d\u544a\u8b66&#xff0c;\u610f\u5473\u7740\u4f60\u6ca1\u6709\u65f6\u95f4\u4ece\u5bb9\u6392\u67e5&#xff0c;\u53ea\u80fd\u5728\u538b\u529b\u4e0b\u505a\u51b3\u7b56\u2014\u2014\u800c\u8fd9\u6070\u6070\u662f\u6700\u5bb9\u6613\u8bef\u5220\u7684\u65f6\u523b\u3002<\/p>\n<hr \/>\n<p>\u5173\u4e8e\u672c\u6587\u547d\u4ee4\u7684\u8bf4\u660e&#xff1a;\u6587\u4e2d\u7684\u547d\u4ee4\u4e0e\u53c2\u6570\u57fa\u4e8e\u4e3b\u6d41 Linux \u53d1\u884c\u7248\u7684\u5e38\u89c1\u884c\u4e3a&#xff0c;du\/lsof\/journalctl \u7b49\u5de5\u5177\u5728\u4e0d\u540c\u7248\u672c\u95f4\u9009\u9879\u57fa\u672c\u4e00\u81f4&#xff0c;\u4f46\u6d89\u53ca\u6587\u4ef6\u7cfb\u7edf\u8c03\u6574\u7684\u64cd\u4f5c&#xff08;tune2fs -m\u3001\u6269\u5bb9\u540e\u6269\u5206\u533a&#xff09;\u4f1a\u76f4\u63a5\u6539\u52a8\u78c1\u76d8\u5143\u6570\u636e&#xff0c;\u6267\u884c\u524d\u8bf7\u786e\u8ba4\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\u3001\u8bbe\u5907\u8def\u5f84&#xff0c;\u5e76\u5728\u6709\u5feb\u7167\u7684\u524d\u63d0\u4e0b\u8fdb\u884c\u3002\u4fdd\u7559\u5757\u6bd4\u4f8b\u3001journal \u4e0a\u9650\u8fd9\u7c7b\u6570\u503c\u7ed9\u7684\u662f\u5e38\u7528\u53c2\u8003&#xff0c;\u5177\u4f53\u5e94\u6309\u4f60\u7684\u78c1\u76d8\u89c4\u6a21\u548c\u4e1a\u52a1\u7279\u6027\u8c03\u6574\u3002<\/p>\n<p>\u56de\u5230\u5f00\u5934\u90a3\u4e2a\u95ee\u9898&#xff1a;\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u544a\u8b66\u7684\u65f6\u5019&#xff0c;\u771f\u6b63\u8981\u82b1\u65f6\u95f4\u7684\u4e0d\u662f\u5220\u6587\u4ef6&#xff0c;\u800c\u662f\u5224\u65ad\u6ee1\u7684\u662f\u5bb9\u91cf\u3001inode \u8fd8\u662f\u53e5\u67c4\u3002\u5224\u65ad\u5bf9\u4e86&#xff0c;\u540e\u9762\u5c31\u662f\u51e0\u6761\u547d\u4ee4\u7684\u4e8b&#xff1b;\u5224\u65ad\u9519\u4e86&#xff0c;\u5220\u518d\u591a\u6587\u4ef6\u4e5f\u4e0d\u52a8\u5730\u65b9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[84,92,43],"topic":[],"class_list":["post-119257","post","type-post","status-publish","format-standard","hentry","category-server","tag-android","tag-github","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/119257.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/119257.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-28T23:09:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119257.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/119257.html\",\"name\":\"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-28T23:09:08+00:00\",\"dateModified\":\"2026-10-28T23:09:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/119257.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/119257.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119257.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/119257.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/119257.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-28T23:09:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/119257.html","url":"https:\/\/www.wsisp.com\/helps\/119257.html","name":"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-28T23:09:08+00:00","dateModified":"2026-10-28T23:09:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/119257.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/119257.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/119257.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u78c1\u76d8\u7a7a\u95f4\u600e\u4e48\u770b\uff1fdf \u548c du \u5bf9\u4e0d\u4e0a\u65f6\u7684\u6392\u67e5\u8def\u5f84"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/119257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=119257"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/119257\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=119257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=119257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=119257"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=119257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}