{"id":413,"date":"2018-01-10T11:09:09","date_gmt":"2018-01-10T11:09:09","guid":{"rendered":"http:\/\/hyderabadwebhosting.in\/blog\/?p=413"},"modified":"2018-02-13T02:21:38","modified_gmt":"2018-02-13T02:21:38","slug":"7-useful-du-commads-check-disk-usage","status":"publish","type":"post","link":"https:\/\/hyderabadwebhosting.in\/blog\/7-useful-du-commads-check-disk-usage\/","title":{"rendered":"7 useful du commads to check the disk usage"},"content":{"rendered":"<p><strong><span style=\"font-size: x-large;\">7 useful du commads to check the disk usage<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">The Linux \u201cdu\u201d (Disk Usage) is a standard Unix\/Linux command, used to check the information of disk usage of files and directories on a machine. The du command has many parameter options that can be used to get the results in many formats. The du command also displays the files and directory sizes in a recursively manner.<\/span><\/p>\n<p><span style=\"font-size: large;\">Here, we will discuss about the 7 useful du commands<\/span><\/p>\n<p><span style=\"font-size: large;\">1. To find out the disk usage summary of a \/home\/directoryname directory tree and each of its sub directories. Enter the command as:<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du \/home\/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">2. Using \u201c-h\u201d option with \u201cdu\u201d command provides results in \u201cHuman Readable Format\u201c. Means you can see sizes in Bytes, Kilobytes, Megabytes, Gigabytes etc.<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -h \/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">3. To get the summary of a grand total disk usage size of an directory use the option \u201c-s\u201d as follows.<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -sh \/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">4. Using \u201c-a\u201d flag with \u201cdu\u201d command displays the disk usage of all the files and directories.<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -a \/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">5. Using \u201c-a\u201d flag along with \u201c-h\u201d displays disk usage of all files and folders in human readeable format.<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -ah \/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">6. To get the summary of disk usage of directory tree along with its subtrees in Megabytes (MB) only by using this option &#8220;-mh&#8221;<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -mh \/directoryname<\/span><\/strong><\/p>\n<p><span style=\"font-size: large;\">7. The \u201c-c\u201d flag provides a grand total usage disk space at the last line<\/span><\/p>\n<p><strong><span style=\"font-size: large;\">du -c \/directoryname<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tfPqExJLUpMSkwpT03KyC8uycxL18vM00\/KyU8HAA==\" \/><input type=\"hidden\" name=\"blogName\" value=\"86hMSS1KTEpMUQhPTVLwyC8uycxLBwA=\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzE0BgA=\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"M1coLU5NK81RSClVSM7PzU1MKVYoyVdIzkhNzlYoyUhVSMkszgaqSUxPBQA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"DclJDoAwCADAFyFHE39DAUvTzUiJ8fc617G1Lj8Q7RW9KZE8mmz6KiNvZWBqM+MO4XpGAwng2TuJA5tyBSle\/6Ss+AE=\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"c\/QLDVAICHJ08XD0AwA=\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwtNA1MNQ1NFAwNLQyACJLAA==\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"rVXLbtswELz3KxYpECRAbDfpI0Xs+hD0EaD1pWg+YCWuJCIUKZBUEvWUD2l\/Ll\/SJWUrUu0UaeyTKIkczszOkrNqPnPeGp3zs0INzjeKPuxlRvuRkz\/pDG5HCm1O0735KdSOslqBqCE1ZYnCgTeQFpRegS8IhHRXPAdzmk0C2pwfS\/BJNX8xqx7dZLXFD0b5JnV9C\/d3v0R9f\/cbDj4G1MuAegjSAfJy1AKtgEstbyft9MhHi6NAUQxZSZ0ZW6KXRoPJeiTDWyYVMaYW\/N1S6o2V\/M4zEUpMC6lpDIHUSjJPLNDxP91AhRZL8mTBVAGd3SjQQ8oKE+qI5OQjDUuuVt4xnXZ1S8qtwaNyJpCsFDYurlzn2ECwLWIhA6e1dfKaVBOQNdlxZ\/\/TXL8gS0dwQ3AjlQp7p7XjDRNTt9TXCq+F+88tjlmnYSUsYoXaK4SrGZRVcUEQJoUpadJJ1exxT7i3RNEL4vKEBZI9dXXSr98YPulQlrBLZ6s7W6P87+CvqLPoDZSem\/CTMWdZ6jwEfFSEgLfhYe998ZD6Fe3KmmspuNS9+PCki5r\/wndCgYki+ByzxN\/HsCDkIDamjjl0bFYXlfPGkzuCr1KZpB0uKMfl8ItcDoF8On6+VaMCdmPU65iYVfcMEpLbYI03HtUgRbw+TtC9vHByI8DS5eC6CwZzE2dGKXPjthHrdqX2TT8WGAhmCvNHQjE4HYbnGXIDbz4zQl9soRR3JPTtZqGoGKST2zZGJ3Nd4oM8LqIgG\/NdxKaw3BQUu6I9YbcSvavyvnsszENpfx9zD6YsT7nwOWrtOhcOFueHfGHx4Z+EtAdrfcH35DLw+y\/fn5y8mo7KIo6Op1vYUe7KjtP21guVTrsIdEfdsMFbc6JPjJqyK62JCp0HxRf0FoLSJ+rZ14mrphve\/gA=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\"><img src=\"https:\/\/hyderabadwebhosting.in\/blog\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/sheep_32x32.png\" alt=\"www.pdf24.org\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"<p>7 useful du commads to check the disk usage The Linux \u201cdu\u201d (Disk Usage) is a standard Unix\/Linux command, used to check the information of disk usage of files and directories on a machine. The du command has many parameter options that can be used to get the results in many formats. The du command\u2026 <span class=\"read-more\"><a href=\"https:\/\/hyderabadwebhosting.in\/blog\/7-useful-du-commads-check-disk-usage\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":384,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps"],"_links":{"self":[{"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":1,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":414,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/413\/revisions\/414"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/media\/384"}],"wp:attachment":[{"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hyderabadwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}