df -hAnd if you whant to find the files bigger than a given size, you can use this command:
find </path/to/directory/> -type f -size +<size-in-kb>k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’all you need is to specify the path and the size in kb (50000 for 50Mb for example).
You can also check the top 10 biggest files in a given directory with:
du -sk </path/to/directory/>* | sort -r -n | head -10Or with a more readable output:
du -sh $(du -sk ./* | sort -r -n | head -10 | cut -d / -f 2)
No comments:
Post a Comment