- You can use the du command
- du -kscx *
- du -hc --max-depth=4 /dir | sort -h
- du -sch *
- Another option is to use the find command -
- find /home/ -size +1073700000c -print
- find /home/ -size +1073700000c -print
- The following command will display all files and folders sorted by MegaBytes
- du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'
- du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'
- Below is the "find"command that looks for specific files in the "home" directory. The following script is finding files that are 500000k or larger
- find /home -type f -size +500000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
To check what is taking up space on your server, you can run multiple commands -
- 0 משתמשים שמצאו מאמר זה מועיל
