{"id":75,"date":"2021-04-29T15:50:50","date_gmt":"2021-04-29T15:50:50","guid":{"rendered":"https:\/\/hiyokotech.com\/?p=75"},"modified":"2022-08-02T11:55:37","modified_gmt":"2022-08-02T11:55:37","slug":"linux-most-used-disk-directory","status":"publish","type":"post","link":"https:\/\/hiyokotech.com\/?p=75","title":{"rendered":"linux &#8211; most used disk directory"},"content":{"rendered":"\n<p>Sometimes system troble occur by the disk space problem. we can check root cause by some command.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Volume usage per partition<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ df -h\nFilesystem      Size  Used Avail Use% Mounted on\ndevtmpfs        482M     0  482M   0% \/dev\ntmpfs           492M     0  492M   0% \/dev\/shm\ntmpfs           492M  516K  492M   1% \/run\ntmpfs           492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1      9.0G  8.3G  798M  92% \/\ntmpfs            99M     0   99M   0% \/run\/user\/1000\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Most used disk directory<\/strong><\/p>\n\n\n\n<p>Under \/<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># du -s \/* | sort -rn | head -10\n4093372 \/var\n4069492 \/usr\n160072  \/opt\n53264   \/etc\n34652   \/boot\n7016    \/home\n548     \/run\n300     \/root\n4       \/tmp\n0       \/sys\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Under \/var\/<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># du -s \/var\/* | sort -rn | head -10\n1474252 \/var\/lib\n1048576 \/var\/swpfile\n997256  \/var\/log\n390368  \/var\/cache\n182480  \/var\/www\n484     \/var\/opt\n16      \/var\/spool\n0       \/var\/yp\n0       \/var\/tmp\n0       \/var\/run<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Check journal file size<\/strong><\/p>\n\n\n\n<p>Check size and delte files which are before 3 days<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># journalctl --disk-usage\r\nArchived and active journals take up 989.0M on disk.\n\r\n# journalctl --vacuum-time=3d\r<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes system troble occur by the disk space problem. we can check root cause by some command. Volume usage per partition Most used disk directory Under \/ Under \/var\/ Check journal file size Check size and delte files which are before 3 days<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/75"}],"collection":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=75"}],"version-history":[{"count":3,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/75\/revisions\/311"}],"wp:attachment":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}