{"id":104284,"date":"2026-09-12T11:25:09","date_gmt":"2026-09-12T03:25:09","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/104284.html"},"modified":"2026-09-12T11:25:09","modified_gmt":"2026-09-12T03:25:09","slug":"linux-%e7%a3%81%e7%9b%98%e6%bb%a1%e5%b8%b8%e8%a7%81%e5%a4%84%e7%90%86%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/104284.html","title":{"rendered":"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848"},"content":{"rendered":"<h3>\u6b65\u9aa4 1&#xff1a;\u5148\u5b9a\u4f4d\u54ea\u91cc\u5360\u6ee1\u78c1\u76d8<\/h3>\n<p># \u67e5\u770b\u78c1\u76d8\u5206\u533a\u4f7f\u7528\u7387<br \/>\ndf -h<br \/>\n# \u8fdb\u5165\u78c1\u76d8\u4f7f\u7528\u7387100%\u7684\u6302\u8f7d\u70b9&#xff0c;\u9010\u5c42\u770b\u54ea\u4e2a\u76ee\u5f55\u5927<br \/>\ndu -sh *<br \/>\n# \u53ea\u770b\u4e00\u7ea7\u76ee\u5f55\u5927\u5c0f<br \/>\ndu -h &#8211;max-depth&#061;1 \/var\/log<\/p>\n<p>\u5751&#xff1a;df \u548c du \u7ed3\u679c\u4e0d\u4e00\u81f4&#xff1a;\u5927\u6982\u7387\u5b58\u5728\u5df2\u7ecf rm&#xff0c;\u4f46\u8fdb\u7a0b\u8fd8\u6301\u6709\u53e5\u67c4\u7684 deleted \u65e5\u5fd7\u3002<\/p>\n<p>du \u770b\u4e0d\u5230&#xff0c;\u4f46 df \u7edf\u8ba1\u5360\u7528\u3002<\/p>\n<h3>\u6b65\u9aa4 2&#xff1a;\u533a\u5206\u4e24\u79cd\u60c5\u51b5<\/h3>\n<h5>\u60c5\u51b5 A&#xff1a;\u5927\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u8fdb\u7a0b\u6ca1\u6709\u5728\u5199&#xff08;\u5f52\u6863\u65e7\u65e5\u5fd7&#xff09;<\/h5>\n<p>\u76f4\u63a5 rm \u5220\u9664\u5373\u53ef\u91ca\u653e\u7a7a\u95f4\u3002<\/p>\n<h5>\u60c5\u51b5 B&#xff1a;\u5927\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u8fdb\u7a0b\u8fd8\u5728\u6301\u7eed\u5199\u5165&#xff08;\u6700\u5e38\u89c1&#xff09;<\/h5>\n<p>\u274c\u7981\u6b62\u76f4\u63a5 rm\u3002<\/p>\n<p>\u2705\u6b63\u786e\u64cd\u4f5c&#xff1a;\u6e05\u7a7a\u6587\u4ef6<\/p>\n<p>&gt; big-app.log<\/p>\n<p>\u6267\u884c\u5b8c&#xff0c;df \u770b\u78c1\u76d8\u7a7a\u95f4\u9a6c\u4e0a\u91ca\u653e\u3002<\/p>\n<p>\u5982\u679c\u624b\u8d31\u5df2\u7ecf rm \u4e86\u6d3b\u8dc3\u65e5\u5fd7\u6587\u4ef6&#xff1a;<\/p>\n<li>lsof |grep deleted \u627e\u5230 PID<\/li>\n<li>\u4e1a\u52a1\u5141\u8bb8&#xff1a;\u91cd\u542f\u5bf9\u5e94\u670d\u52a1\u8fdb\u7a0b&#xff0c;\u91ca\u653e\u53e5\u67c4&#xff0c;\u78c1\u76d8\u91ca\u653e\u3002<\/li>\n<li>\u4e1a\u52a1\u4e0d\u80fd\u91cd\u542f&#xff1a;\u8fdb\u5165\u8be5\u6587\u4ef6\u7684 \/proc\/&lt;pid&gt;\/fd\/ \u76ee\u5f55&#xff0c;\u627e\u5230\u5bf9\u5e94 fd&#xff0c;\u6267\u884c &gt; fd\u7f16\u53f7 \u6e05\u7a7a\u6587\u4ef6&#xff0c;\u4e0d\u7528\u91cd\u542f\u8fdb\u7a0b\u3002<\/li>\n<p>\u793a\u4f8b&#xff08;\u4e0d\u91cd\u542f\u8fdb\u7a0b\u6e05\u7a7a\u5df2\u5220\u9664\u53e5\u67c4\u6587\u4ef6&#xff09;<\/p>\n<p>cd \/proc\/1234\/fd<br \/>\n&gt; 3<\/p>\n<h3>\u6b65\u9aa4 3&#xff1a;\u4e34\u65f6\u5e94\u6025\u5904\u7406&#xff08;\u78c1\u76d8\u5b8c\u5168\u5199\u6ee1&#xff0c;\u8fde\u521b\u5efa\u4e34\u65f6\u6587\u4ef6\u90fd\u5931\u8d25&#xff09;<\/h3>\n<p>\u78c1\u76d8 100%&#xff0c;\u8fde\u521b\u5efa tmp \u6587\u4ef6\u90fd\u5931\u8d25&#xff1a;<\/p>\n<li>\u4f18\u5148\u6e05\u7a7a\u5927\u7684\u6d3b\u8dc3\u65e5\u5fd7 &gt; xxx.log&#xff0c;\u4e0d\u8981\u4ea7\u751f\u65b0\u6587\u4ef6&#xff1b;<\/li>\n<li>\u5982\u679c\u6709\u8001\u65e7\u5f52\u6863\u65e5\u5fd7&#xff0c;\u53ef\u4ee5 rm \u5220\u9664&#xff1b;<\/li>\n<li>\u5e94\u6025\u4e4b\u540e&#xff0c;\u5fc5\u987b\u6839\u6cbb&#xff0c;\u4e0d\u80fd\u6bcf\u6b21\u624b\u52a8\u6e05\u7406\u3002<\/li>\n<h3>\u6b65\u9aa4 4&#xff1a;\u6839\u6cbb\u65b9\u6848&#xff08;\u9632\u6b62\u518d\u6b21\u78c1\u76d8\u6253\u6ee1&#xff09;<\/h3>\n<h4>4.1\u00a0crontab \u5b9a\u65f6\u81ea\u52a8\u6e05\u7406 7 \u5929\u65e5\u5fd7\u914d\u7f6e<\/h4>\n<h5>1&#xff09;find \u547d\u4ee4\u8bf4\u660e<\/h5>\n<p>find \/var\/log\/hadoop-yarn -type f -name &#034;*.log*&#034; -mtime &#043;7 -delete<\/p>\n<p>\u53c2\u6570\u89e3\u91ca<\/p>\n<ul>\n<li>\/var\/log\/hadoop-yarn&#xff1a;\u8981\u6e05\u7406\u7684\u65e5\u5fd7\u76ee\u5f55<\/li>\n<li>-type f&#xff1a;\u53ea\u5339\u914d\u666e\u901a\u6587\u4ef6<\/li>\n<li>-name &#034;*.log*&#034;&#xff1a;\u5339\u914d\u65e5\u5fd7\u5f52\u6863\u6587\u4ef6&#xff08;log.1\u3001log\u2011\u65e5\u671f.gz&#xff09;<\/li>\n<li>-mtime &#043;7&#xff1a;\u4fee\u6539\u65f6\u95f4\u5927\u4e8e 7 \u5929\u7684\u6587\u4ef6<\/li>\n<li>-delete&#xff1a;\u76f4\u63a5\u5220\u9664<\/li>\n<\/ul>\n<p>\u26a0\ufe0f\u7981\u5fcc&#xff1a;\u4e0d\u8981\u5339\u914d *.log&#xff0c;\u8fd9\u662f\u7a0b\u5e8f\u6b63\u5728\u8ffd\u52a0\u5199\u7684\u6d3b\u8dc3\u65e5\u5fd7&#xff01;\u53ea\u5339\u914d\u5207\u5272\u540e\u7684\u5f52\u6863\u6587\u4ef6\u3002<\/p>\n<h5>2&#xff09;\u7f16\u5199 shell \u811a\u672c&#xff08;\u63a8\u8350&#xff0c;\u65b9\u4fbf\u8c03\u8bd5\u3001\u6253\u65e5\u5fd7&#xff09;<\/h5>\n<p>\/opt\/scripts\/clean_old_log.sh<\/p>\n<p>#!\/bin\/bash<br \/>\n# \u6e05\u74067\u5929\u4ee5\u4e0a\u5f52\u6863\u65e5\u5fd7&#xff0c;\u7981\u6b62\u5220\u9664\u6b63\u5728\u5199\u5165\u7684xxx.log<br \/>\nLOG_DIRS&#061;(<br \/>\n&#034;\/var\/log\/hadoop-yarn&#034;<br \/>\n&#034;\/var\/log\/spark&#034;<br \/>\n&#034;\/opt\/flink\/log&#034;<br \/>\n)<\/p>\n<p>for dir in &#034;${LOG_DIRS[&#064;]}&#034;<br \/>\ndo<br \/>\n    if [ -d &#034;$dir&#034; ];then<br \/>\n        find &#034;$dir&#034; -type f -name &#034;*.log.*&#034; -mtime &#043;7 -delete<br \/>\n    fi<br \/>\ndone<\/p>\n<p>\u8d4b\u6267\u884c\u6743\u9650<\/p>\n<p>chmod &#043;x \/opt\/scripts\/clean_old_log.sh<\/p>\n<p>\u672c\u5730\u5148\u624b\u52a8\u6267\u884c\u4e00\u904d\u6d4b\u8bd5&#xff0c;\u786e\u8ba4\u4e0d\u4f1a\u8bef\u5220\u6587\u4ef6\u3002<\/p>\n<h5>3&#xff09;\u914d\u7f6e crontab \u5b9a\u65f6\u4efb\u52a1<\/h5>\n<p>crontab -e<\/p>\n<p>\u52a0\u5165&#xff0c;\u6bcf\u5929\u51cc\u6668 2 \u70b9\u6267\u884c\u6e05\u7406&#xff08;\u4e1a\u52a1\u4f4e\u5cf0&#xff09;<\/p>\n<p>0 2 * * * \/opt\/scripts\/clean_old_log.sh &gt;&gt; \/opt\/scripts\/clean_log_cron.log 2&gt;&amp;1<\/p>\n<ul>\n<li>0 2 * * *&#xff1a;\u6bcf\u5929 02:00 \u8fd0\u884c<\/li>\n<li>&gt;&gt; \/opt\/scripts\/clean_log_cron.log 2&gt;&amp;1&#xff1a;\u628a\u811a\u672c\u8f93\u51fa\u548c\u9519\u8bef\u8f93\u51fa\u8bb0\u5f55&#xff0c;\u65b9\u4fbf\u6392\u67e5\u5b9a\u65f6\u4efb\u52a1\u662f\u5426\u5f02\u5e38\u3002<\/li>\n<\/ul>\n<p>\u67e5\u770b\u5df2\u914d\u7f6e\u5b9a\u65f6\u4efb\u52a1<\/p>\n<p>crontab -l<\/p>\n<h4>4.2\u00a0\u914d\u7f6e logrotate \u65e5\u5fd7\u8f6e\u8f6c&#xff08;\u6807\u51c6\u751f\u4ea7\u65b9\u6848&#xff09;<\/h4>\n<p>\u6309\u6587\u4ef6\u5927\u5c0f \/ \u65f6\u95f4\u5207\u5272\u65e5\u5fd7&#xff0c;\u81ea\u52a8\u538b\u7f29\u3001\u81ea\u52a8\u5220\u9664 N \u5929\u524d\u65e5\u5fd7\u3002\u907f\u514d\u5355\u65e5\u5fd7\u65e0\u9650\u81a8\u80c0\u3002<\/p>\n<p>\u7b80\u5355\u793a\u4f8b\u914d\u7f6e \/etc\/logrotate.d\/bizlog\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\/opt\/app\/logs\/*.log {<br \/>\n    daily<br \/>\n    rotate 7<br \/>\n    compress<br \/>\n    missingok<br \/>\n    copytruncate<br \/>\n}<\/p>\n<ul>\n<li>daily&#xff1a;\u6309\u5929\u5207\u5272<\/li>\n<li>rotate 7&#xff1a;\u4fdd\u7559 7 \u4efd\u5386\u53f2\u65e5\u5fd7<\/li>\n<li>copytruncate&#xff1a;\u590d\u5236\u540e\u622a\u65ad\u539f\u6587\u4ef6&#xff0c;\u4e0d\u9700\u8981\u91cd\u542f\u5e94\u7528&#xff0c;\u9002\u5408\u4e0d\u80fd\u91cd\u542f\u7684\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p>1&#xff09;\u4e1a\u52a1\u7a0b\u5e8f\u672c\u8eab\u914d\u7f6e\u65e5\u5fd7\u7ea7\u522b&#xff0c;\u5173\u95ed\u5927\u91cf DEBUG \u6253\u5370\u3002<\/p>\n<p>2&#xff09;\u5b9a\u65f6\u4efb\u52a1\u914d\u5408 find \u6e05\u7406\u5f52\u6863\u65e5\u5fd7&#xff08;\u4ec5\u6e05\u7406\u5df2\u7ecf\u5207\u5272\u5b8c\u6bd5\u7684\u65e7\u65e5\u5fd7&#xff0c;\u4e0d\u8981\u5904\u7406\u6b63\u5728\u5199\u7684\u65e5\u5fd7&#xff09;\u3002<\/p>\n<p>\u91cd\u8981\u63d0\u9192&#xff1a;<\/p>\n<p>crontab \u53ea\u6e05\u7406\u5df2\u7ecf\u5207\u5272\u5b8c\u6bd5\u7684\u5f52\u6863\u65e7\u65e5\u5fd7&#xff0c;\u7edd\u5bf9\u4e0d\u8981\u53bb\u5220\u9664\u5e94\u7528\u6b63\u5728\u6301\u7eed\u5199\u5165\u7684\u6d3b\u8dc3\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u5426\u5219\u51fa\u73b0 deleted \u5e7d\u7075\u6587\u4ef6&#xff0c;\u78c1\u76d8\u7a7a\u95f4\u4e0d\u91ca\u653e\u3002<\/p>\n<p>\u6d3b\u8dc3\u65e5\u5fd7\u4ea4\u7ed9 logrotate&#xff1b;<\/p>\n<p>crontab \u9002\u5408\u6e05\u7406 .log.1\u3001.log\u201120260908.gz \u8fd9\u7c7b\u8f6e\u8f6c\u540e\u7684\u5386\u53f2\u5f52\u6863\u6587\u4ef6\u3002<\/p>\n<h3>\u4e09\u3001\u5bf9\u6bd4\u4e24\u79cd\u6839\u6cbb\u65b9\u6848<\/h3>\n<table>\n<tr>\u65b9\u6848logrotatecrontab&#043;find<\/tr>\n<tbody>\n<tr>\n<td>\u4f5c\u7528<\/td>\n<td>\u65e5\u5fd7\u5207\u5272\u3001\u538b\u7f29\u3001\u4fdd\u7559\u4efd\u6570\u3001\u622a\u65ad\u539f\u6587\u4ef6<\/td>\n<td>\u53ea\u5220\u9664\u5df2\u7ecf\u5207\u5272\u5b8c\u6210\u7684\u65e7\u5f52\u6863\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>\u5904\u7406\u6d3b\u8dc3\u65e5\u5fd7<\/td>\n<td>\u2705\u652f\u6301&#xff0c;copytruncate \u6a21\u5f0f\u4e0d\u7528\u91cd\u542f\u670d\u52a1<\/td>\n<td>\u274c\u4e0d\u80fd\u5904\u7406\u6d3b\u8dc3\u65e5\u5fd7<\/td>\n<\/tr>\n<tr>\n<td>\u80fd\u529b<\/td>\n<td>\u5b8c\u6574\u65e5\u5fd7\u6cbb\u7406<\/td>\n<td>\u4ec5\u505a\u65e7\u6587\u4ef6\u5220\u9664<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u4ea7\u5efa\u8bae<\/td>\n<td>\u9996\u9009\u5fc5\u5907<\/td>\n<td>\u8f85\u52a9&#xff0c;\u642d\u914d logrotate \u4f7f\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u6b65\u9aa4 1&#xff1a;\u5148\u5b9a\u4f4d\u54ea\u91cc\u5360\u6ee1\u78c1\u76d8# \u67e5\u770b\u78c1\u76d8\u5206\u533a\u4f7f\u7528\u7387<br \/>\ndf -h<br \/>\n# \u8fdb\u5165\u78c1\u76d8\u4f7f\u7528\u7387100%\u7684\u6302\u8f7d\u70b9&#xff0c;\u9010\u5c42\u770b\u54ea\u4e2a\u76ee\u5f55\u5927<br \/>\ndu -sh *<br \/>\n# \u53ea\u770b\u4e00\u7ea7\u76ee\u5f55\u5927\u5c0f<br \/>\ndu -h &#8211;max-depth1 \/var\/log\u5751&#xff1a;df \u548c du \u7ed3\u679c\u4e0d\u4e00\u81f4&#xff1a;\u5927\u6982\u7387\u5b58\u5728\u5df2\u7ecf rm&#xff0c;\u4f46\u8fdb\u7a0b\u8fd8\u6301\u6709\u53e5\u67c4\u7684 deleted \u65e5\u5fd7\u3002du \u770b\u4e0d\u5230&#xff0c;\u4f46 df \u7edf\u8ba1\u5360\u7528\u3002\u6b65\u9aa4 2&#xff1a;\u533a\u5206\u4e24\u79cd\u60c5\u51b5\u60c5\u51b5 A&amp;#xff<\/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":[58,43,44],"topic":[],"class_list":["post-104284","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \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\/104284.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6b65\u9aa4 1&#xff1a;\u5148\u5b9a\u4f4d\u54ea\u91cc\u5360\u6ee1\u78c1\u76d8# \u67e5\u770b\u78c1\u76d8\u5206\u533a\u4f7f\u7528\u7387 df -h # \u8fdb\u5165\u78c1\u76d8\u4f7f\u7528\u7387100%\u7684\u6302\u8f7d\u70b9&#xff0c;\u9010\u5c42\u770b\u54ea\u4e2a\u76ee\u5f55\u5927 du -sh * # \u53ea\u770b\u4e00\u7ea7\u76ee\u5f55\u5927\u5c0f du -h --max-depth1 \/var\/log\u5751&#xff1a;df \u548c du \u7ed3\u679c\u4e0d\u4e00\u81f4&#xff1a;\u5927\u6982\u7387\u5b58\u5728\u5df2\u7ecf rm&#xff0c;\u4f46\u8fdb\u7a0b\u8fd8\u6301\u6709\u53e5\u67c4\u7684 deleted \u65e5\u5fd7\u3002du \u770b\u4e0d\u5230&#xff0c;\u4f46 df \u7edf\u8ba1\u5360\u7528\u3002\u6b65\u9aa4 2&#xff1a;\u533a\u5206\u4e24\u79cd\u60c5\u51b5\u60c5\u51b5 A&amp;#xff\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/104284.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-12T03:25:09+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104284.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/104284.html\",\"name\":\"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-12T03:25:09+00:00\",\"dateModified\":\"2026-09-12T03:25:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/104284.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/104284.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104284.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848\"}]},{\"@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":"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \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\/104284.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6b65\u9aa4 1&#xff1a;\u5148\u5b9a\u4f4d\u54ea\u91cc\u5360\u6ee1\u78c1\u76d8# \u67e5\u770b\u78c1\u76d8\u5206\u533a\u4f7f\u7528\u7387 df -h # \u8fdb\u5165\u78c1\u76d8\u4f7f\u7528\u7387100%\u7684\u6302\u8f7d\u70b9&#xff0c;\u9010\u5c42\u770b\u54ea\u4e2a\u76ee\u5f55\u5927 du -sh * # \u53ea\u770b\u4e00\u7ea7\u76ee\u5f55\u5927\u5c0f du -h --max-depth1 \/var\/log\u5751&#xff1a;df \u548c du \u7ed3\u679c\u4e0d\u4e00\u81f4&#xff1a;\u5927\u6982\u7387\u5b58\u5728\u5df2\u7ecf rm&#xff0c;\u4f46\u8fdb\u7a0b\u8fd8\u6301\u6709\u53e5\u67c4\u7684 deleted \u65e5\u5fd7\u3002du \u770b\u4e0d\u5230&#xff0c;\u4f46 df \u7edf\u8ba1\u5360\u7528\u3002\u6b65\u9aa4 2&#xff1a;\u533a\u5206\u4e24\u79cd\u60c5\u51b5\u60c5\u51b5 A&amp;#xff","og_url":"https:\/\/www.wsisp.com\/helps\/104284.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-12T03:25:09+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/104284.html","url":"https:\/\/www.wsisp.com\/helps\/104284.html","name":"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-12T03:25:09+00:00","dateModified":"2026-09-12T03:25:09+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/104284.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/104284.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/104284.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux \u78c1\u76d8\u6ee1\u5e38\u89c1\u5904\u7406\u65b9\u6848"}]},{"@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\/104284","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=104284"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/104284\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=104284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=104284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=104284"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=104284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}