Category: Server Admin

Sort all file sizes in a directory in Linux

We can use multiple commands like ls, du to sort all the files by size in a directory of Linux system. The trick here is to pass some additional arguments along with ls and...

 How to get the actual directory size using du?

There are different commands like du, find as well as different methods you can use to get actual directory size in a Linux/Unix system. But these commands have some advantages and disadvantages also.. Let...

Disk space in tmp directory in Linux

We can use du command to check the space in tmp directory or any other directory in Linux by using some other additional parameters. The below commands can be used to display the free...

Partition used and available size

“df” command can be used to list the partition and also the free space that is available with each partition along with where it has been mounted. To see the list of partitions in...

Using du to count number of files in Linux

Though du is useful in counting the file and directory as well as seeing how much space is occupied by a directory in a Linux system. It can be also used to count number...

Total Disk usage for a particular user

There are different commands like du, quota or find that can be run to find disk usage for a particular user. But those commands needs to be executed with particular parameters so that it...

Directory size in CentOS

Directory size in CentOS or in any other linux system such as RHEL or Ubuntu can be found by using du (Disk usage command). “du” command not only lists the size of directories, it...

du only for Directories

As you know, “du” command (du for Disk Usage) can be used to get the list of directories along with other details. But the biggest problem is du would also list all the files...