Using df command showing size in megabytes

Happy New Year 2024! This is going to be a very short post on how to use ‘df’ command to display the disk space usage in megabytes. To display the output in MB (megabytes), we can use the -m flag with the df command as the following: ❯ df -m Filesystem 1M-blocks Used Available Use% Mounted on devtmpfs 4 0 4 0% /dev tmpfs 852 0 852 0% /dev/shm tmpfs 341 6 336 2% /run /dev/mapper/almalinux-root 7578 2068 5511 28% / /dev/vda2 1014 280 735 28% /boot /dev/vda1 599 8 592 2% /boot/efi tmpfs 171 0 171 0% /run/user/1000 It’s simple, isn’t it?...

January 1, 2024 · 1 min · 103 words · kenno

Check disk usage on root (/) partition excluding other partitions

While checking the root partition on my desktop today, I noticed that its usage is at 89% with just 6GiB free. For this reason, I wanted to find out what’s consuming most spaces and whether I can clean it up a bit. # df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora_watamem-root 56G 47G 6.3G 89% / The first two commands that come to my mind are du and ncdu....

September 22, 2022 · 3 min · 544 words · kenno