28 September, 2016

Linux: Directory Space Calculation

Sometimes is usefull to know how much space is a directory using.
This commands tells you:
—> Gives the full amount of size included subdirectories in human readable format.
du -sh
—> Gives a sorted list of directories and its space allocation.
du -s * .[a-zA-Z0-9]* | sort -n | less
—> Gives the space amount used by all files of a user (Change $USER for yours).
find / -printf "%u %s\n" -user $USER | awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'

No comments:

Post a Comment

Redirection in IIS

 This config will redirect every request to https://www.domain.com <configuration>     <system.webServer>         <rewrite>...