Question: How to Check Folder Size in Linux?
Contents If You Want to Check the Total Disk Space Used by a Particular Directory, Use the -S Flag. to Display the Grand Total of Directories, Add -C Flag with...
Contents
If you want to check the total disk space used by a particular directory, use the -s flag.
To display the grand total of directories, add -c flag with du -sh command.
To display only the grand total of the given directory including all the sub-directories, use ‘grep’ command with ‘du’ command like below.
How can I see the size of a folder?
To see a folder size, you need to right-click it and select “Properties” menu item, it seems no problem. But if you want to see the size of 100 folders, you need to click 200 times.
Must Read
How can I tell which files are taking up space Linux?
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.