How To Get File System Disk Usage In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-get-file-system-disk-usage-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

When administrating Linux systems we can found us tracking disk usage. Linux uses different partitions to store data. There are some temp files located in /tmp or different  paths. Some applications are installed into the /opt path. So managing paths and disk usage may become hard in Linux. There are some GUI applications like KDirStat but they are useful for only GUI environments. We will look different commands in this tutorial to get disk usage.

Get Disk Usage With df

We can simple issue df command and get disk usage in Kilobyte like below

Get Disk Usage With df
Get Disk Usage With df

Get Disk Usage With df Human Readable Format

Let’s make it more readable by using gigabyte output. We will provide -h which means human readable format.

Get Disk Usage With df Human Readable Format
Get Disk Usage With df Human Readable Format

Information like Size, Used, Available or Usage percentage are printed in more readable format

Get Disk Usage With df As Megabyte Format

If you like the old days by out size with megabyte use below command.

Get Disk Usage With df As Megabyte Format
Get Disk Usage With df As Megabyte Format

Getting Usage With ncdu

ncdu is text-based disk usage viewer which can be found in Fedora,Ubuntu, Debian distributions. Sadly it is not provided by CentOS default repositories.

  • We need root privilege to scan all root directory
Getting Usage With ncdu
Getting Usage With ncdu

And here after running ncdu we get following screen.

Getting Usage With ncdu
Getting Usage With ncdu

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-get-file-system-disk-usage-in-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  Overview Of Linux File Systems Like Ext3, Btrfs, Zfs