Trần Thị Mai
New member
How do I find the size of a specific directory in Linux?
Answer
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.
Answer
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.