View space and information of HDDs in terminal (dfc command)

To know what are the partitions or devices mounted on the system, what size or space each one has, as well as how many GBs (or MBs) they have free and others there are many options, in this post I will show you how to know this data in a terminal ... and in another post I will show you some graphic applications that do this 😉

Normally if we put in a terminal:

df

These data appear:

As you can see, the numbers…. well, let's just say they are complex to understand.

However, if we add the parameter -h it will show us the numbers in a simpler format:

However ... isn't something like this more beautiful and productive ?:

This is the command DFC … It is a package that is NOT installed by default in our system, but obviously we can install it 😀

For Debian, Ubuntu, Mint, SolusOS or derivatives:

sudo apt-get install -y dfc

For ArchLinux and Chakra:

pacman -S dfc

Well, the idea is understood right? 😉

Once installed, simply run that command in a terminal and voila:

dfc

And voila, the information will be shown in another, more intuitive way ...…

By the way, they can also show the options with which one of those partitions was mounted with the parameter -o … that is:

As well as the option -T (Capital T) shows us if the filesystem is ext3 or ext4, ntfs or whatever:

And well ... there is not much more to add, make a man dfc and read the help to see the rest of the options 😀

Thank you very much to elMor3no for showing the tip in GUTL 😉

regards


32 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   jorgemanjarrezlerma said

    Good tip and very useful when you need information about devices and media. To keep it in the library because I will surely use it.

  2.   City said

    I didn't know that either, thanks KZKG ^ Gaara 🙂

  3.   Daniel Rojas said

    Generally the "-h" parameters of the commands are to indicate a "more human" way of displaying the output of the command

    1.    KZKG ^ Gaara said

      Exact 😀
      However, with dfc there is no -h parameter ... because it automatically provides the information in a friendly way 🙂

  4.   webb_david said

    Hear a question how do I install it in xubuntu since it is not in the ubuntu repos, where did you get the article they give the address to download the deb but it does not work any idea how to install it ???

    1.    Daniel said

      Hey.

      You can download it directly from the ubuntu packages, you can find all of them at packages.ubuntu.com
      I leave you the direct links
      32 bits http://mirror.pnl.gov/ubuntu//pool/universe/d/dfc/dfc_2.5.0-1_i386.deb
      64 bits http://mirror.pnl.gov/ubuntu//pool/universe/d/dfc/dfc_2.5.0-1_amd64.deb

      Greetings.

      1.    webb_david said

        Thank you very much I installed it and it is perfect.

        1.    KZKG ^ Gaara said

          Thanks to you for commenting 🙂

  5.   jlbaena said

    To analyze disk space from the console I use this application ncdu I leave you two more interesting links:
    http://joedicastro.com/productividad-linux-ncdu.html
    http://manualinux.heliohost.org/ncdu.html

  6.   Daniel said

    this nice command, thanks.

  7.   sieg84 said

    chin, it is not in the openSUSE repos.

  8.   Nonamed said

    interesting, thanks

    What I don't understand is why in the root / partition they put the uuid instead of putting for example / dev / sda1 which would be more understandable

    1.    Nonamed said

      with the blkid command (as superuser) we will know which unit the uuid corresponds to

    2.    KZKG ^ Gaara said

      This after a certain kernel version is like this, I think as a security measure, because sda1 could change if we connect another HDD in the computer, but the UUID will never change :)

  9.   hexborg said

    Very good command. In arch I don't know if it is available. I will test as soon as the AUR is out of maintenance. Another option is to use cwrapper, which colors various normal commands, but dfc is better.

  10.   anubis said

    In Chakra it is not in the official repositories, so it would be with:
    ccr -S dfc 😉

  11.   DMoZ said

    Installed on Slackware x64 = D, greetings !!! ...

  12.   Leo said

    Very good trick.
    What can be done with the terminal is unimaginable.
    Too bad there are so many things with so many options that we can never take full advantage of it.
    That's the great thing about sharing, we always learn something new.

    1.    KZKG ^ Gaara said

      Exactly, the terminal is absolutely amazing… I never get tired of learning new things 🙂
      Thanks for commenting 😀

  13.   helena_ryuu said

    very interesting! although I did not find it in pacman D: and yaourt seems to be still down

  14.   xykyz said

    In Fedora I had to download and compile it by hand, but it seemed very good 😀

    In Arch I'll see what happens when the repositories are no longer under maintenance xD

    1.    helena_ryuu said

      Oo are they in maintenance? I didn't know, thanks for the news ^^

      1.    xykyz said

        If you have yaourt you will have to edit the file /usr/lib/yaourt/util.sh and change the line where it says:
        AURURL = 'http: //aur.archlinux.org'
        per:
        AURURL = 'https: //aur.archlinux.org'
        They have commented to me in G +. Maintenance is over.

        1.    hexborg said

          Fucking !!! Thank you very much for the info, it finally works for me again !! 🙂

  15.   sieg84 said

    Mageia if you have it in the repos

  16.   kike said

    In case it works for someone, I have installed it in Manjaro with the following command:

    # packer -S dfc

    Good post!

  17.   catux said

    In squeeze it did not appear in the repositories so I downloaded the one from wheezy and left with dpkg -i

    http://packages.debian.org/wheezy/dfc

  18.   catux said

    In squeeze I did not find it, so I downloaded it from wheezy and it installed pure dpkg

    http://packages.debian.org/wheezy/dfc

  19.   Victor Franco said

    simple but effective ... thanks ...

  20.   seagym said

    Thanks for the tip.

    In this blog I have learned many tricks to use the terminal that little by little I am losing my fear.

    These commands reminded me of:
    top
    htop

    Both are very useful but always more "friendly" the second.

  21.   Walter said

    Very good!