{"id":109,"date":"2019-05-06T11:24:36","date_gmt":"2019-05-06T16:24:36","guid":{"rendered":"https:\/\/tech.my-netsol.com\/?p=109"},"modified":"2019-05-06T11:24:36","modified_gmt":"2019-05-06T16:24:36","slug":"commands-to-check-hard-disk-partitions-and-disk-space-on-linux","status":"publish","type":"post","link":"https:\/\/tech.my-netsol.com\/?p=109","title":{"rendered":"Commands to check hard disk partitions and disk space on Linux"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">fdisk<\/h3>\n\n\n\n<p>Fdisk is the most commonly used command to check the partitions on a \ndisk. The fdisk command can display the partitions and details like file\n system type. However it does not report the size of each partitions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo fdisk -l <\/pre>\n\n\n\n<p>Each device is reported separately with details about size, seconds, id and individual partitions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">sfdisk<\/h3>\n\n\n\n<p>Sfdisk is another utility with a purpose similar to fdisk, but with \nmore features. It can display the size of each partition in MB.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo sfdisk -l <\/pre>\n\n\n\n<p>Cfdisk works with one partition at a time. So if you need to see the \ndetails of a particular disk, then pass the device name to cfdisk.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo cfdisk \/dev\/sdb<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">parted<\/h3>\n\n\n\n<p>Parted is yet another command line utility to list out partitions and modify them if needed.<br><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo parted -l <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">hwinfo<\/h3>\n\n\n\n<p>The hwinfo is a general purpose hardware information tool and can be \nused to print out the disk and partition list. The output however does \nnot print details about each partition like the above commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ hwinfo --block --short<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>fdisk Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions. $ sudo fdisk -l Each device is reported separately with details about size, seconds, id and individual &#8230; <a title=\"Commands to check hard disk partitions and disk space on Linux\" class=\"read-more\" href=\"https:\/\/tech.my-netsol.com\/?p=109\" aria-label=\"Read more about Commands to check hard disk partitions and disk space on Linux\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11,3],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-linux","category-os"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":0,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.my-netsol.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}