You can use Linux ls command or du command to list files and directories sizes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
## List file and directory size (current directory) ls -lh ## List file and directory size (specific directory) ls -lh /var ## List file and directory size in KB ls -al --block-size=K ## List file and directory size in MB ls -al --block-size=M ## List file and directory size in GB ls -al --block-size=G ## List total size of a directory sudo du -sh /var sudo du -sh /var/* | sort -hr #short by file size |