Easy way to list file and sub directory within a directory and show the size, we can use du command combined with ls command.
du command will show estimate disk space usage in current directory. Above screenshoot show that the size of /var/www is 5,4 GB. Option -s (summarize) will display only a total for each argument, -h will print the result in human readable format (5,4G instead of 5559480).
Now, we combine two commands (du and ls):
Now, we know that the size of temp subdir is 5,3G
For example, in above screenshoot we know that there are 3 sub directories and 1 file under /var/www.
du command will show estimate disk space usage in current directory. Above screenshoot show that the size of /var/www is 5,4 GB. Option -s (summarize) will display only a total for each argument, -h will print the result in human readable format (5,4G instead of 5559480).
Now, we combine two commands (du and ls):
Now, we know that the size of temp subdir is 5,3G
Comments
Post a Comment