How Do I Find the Size of a Directory Wise in Linux?
Contents Option 1: Display the Size of a Directory Using the Du Command. the Du Command Stands for Disk Usage. This Command Is Included by Default in Most...
Contents
Option 1: Display the Size of a Directory Using the du Command. The du command stands for disk usage. This command is included by default in most Linux distributions. The system should display a list of the contents of your home directory, with a number to the left.
How do I find the size of a directory in Linux?
How to view the file size of a directory. To view the file size of a directory pass the -s option to the du command followed by the folder. This will print a grand total size for the folder to standard output.
Must Read
How do I get the size of a directory wise in Unix?
Find Largest Directories in Linux
- du command: Estimate file space usage.
- a : Displays all files and folders.
- sort command : Sort lines of text files.
- -n : Compare according to string numerical value.
- -r : Reverse the result of comparisons.
- head : Output the first part of files.
- -n : Print the first ‘n’ lines.