du -a . | sort -n -r | head -n 10
The command above will return you top 10 files sorted by size in descending order from your current directory. If you want to get list of files from your "/opt" directory, sorted in a similar way, use the following command:
du -a /opt | sort -n -r | head -n 10
No comments:
Post a Comment