Wednesday, October 9, 2019

Find the largest files in your linux file system


This will give you the top largest 20 files in a linux system collectively (directory of VAR in the example)

du -a /var/ | sort -n -r | head -n 20


du will estimate file space usage.
sort will sort out the output of du command.
head will only show top 20 largest file in /dir/

No comments:

Post a Comment