{"id":8517,"date":"2024-11-14T01:31:00","date_gmt":"2024-11-14T06:31:00","guid":{"rendered":"https:\/\/www.both.org\/?p=8517"},"modified":"2024-11-12T21:19:39","modified_gmt":"2024-11-13T02:19:39","slug":"colorful-disk-management-with-dfc","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=8517","title":{"rendered":"Colorful disk management with dfc"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"8517\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">The&nbsp;<strong>dfc<\/strong>&nbsp;command in Linux is a powerful tool that provides users with information on file system space usage<\/span>. It is a tool similar to&nbsp;df,&nbsp;which provides a snapshot of your file system. Here is a look at my file system using the&nbsp;<strong>df<\/strong>&nbsp;command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>don@Jude:~$ df\nFilesystem     1K-blocks      Used Available Use% Mounted on\ntmpfs            6548596      2280   6546316   1% \/run\n\/dev\/nvme0n1p2 959786032 288623572 622334252  32% \/\ntmpfs           32742976    103448  32639528   1% \/dev\/shm\ntmpfs               5120        12      5108   1% \/run\/lock\nefivarfs             192       125        63  67% \/sys\/firmware\/efi\/efivars\ntmpfs           32742976         0  32742976   0% \/run\/qemu\n\/dev\/nvme0n1p1    523248      6284    516964   2% \/boot\/efi\ntmpfs            6548592       208   6548384   1% \/run\/user\/1000\n<\/code><\/pre>\n\n\n\n<p>I can tell with a quick glance that I still have a lot of space available on my system. Using dfc offers additional features such as color-coded output and graphical representations, making it easier to visualize disk usage at a glance. Here is a quick look at my system using&nbsp;<strong>dfc<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"238\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/11\/dfc1.png\" alt=\"\" class=\"wp-image-8518\" style=\"width:799px;height:auto\"\/><figcaption class=\"wp-element-caption\">Screen picture by Don Watkins CC by SA 4.0<\/figcaption><\/figure>\n\n\n\n<p>You can easily see that dfc provides more information and it color and in a format that is more readable for the user. You can turn off the default color option by issuing the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ dfc -c never<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"205\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/11\/dfc2.png\" alt=\"\" class=\"wp-image-8520\" style=\"width:798px;height:auto\"\/><figcaption class=\"wp-element-caption\">Screen picture by Don Watkins CC by SA 4.0<\/figcaption><\/figure>\n\n\n\n<p>You can display all the file systems including pseudo, duplicate and inaccessible filesystems by using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ dfc -a <\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"382\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/11\/dfc3.png\" alt=\"\" class=\"wp-image-8521\" style=\"width:710px;height:auto\"\/><figcaption class=\"wp-element-caption\">Screen picture by Don Watkins CC by SA 4.0<\/figcaption><\/figure>\n\n\n\n<p>The dfc command was not included with my distribution and had to be installed from the command line for Ubuntu based distributions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt install dfc<\/code><\/pre>\n\n\n\n<p>Installation for .rpm based distributions would be the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf install dfc<\/code><\/pre>\n\n\n\n<p>The command is open source and has a&nbsp;BSD-Clause License. You can export the output of the command in HTML, JSON, Tex, and CSV formats. The man page provides excellent documentation and explanation of the various switches for the command. Use the&nbsp;dfc -h&nbsp;command to display an excellent help menu with all the command options.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The&nbsp;dfc&nbsp;command in Linux is a powerful tool that provides users with information on file system space usage. It<\/p>\n","protected":false},"author":32,"featured_media":6986,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[644,5,645],"tags":[511,345],"class_list":["post-8517","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-disk-management","category-linux","category-storage-management-tools","tag-disk-management-tools","tag-storage-management"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8517"}],"version-history":[{"count":4,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8517\/revisions"}],"predecessor-version":[{"id":8524,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8517\/revisions\/8524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/6986"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}