Saturday, January 2, 2021

Sort files based on size for a file-system

cd <file-system> 

cd /

du -sk * | sort -nr | head

or

find / -type f -exec du -Sh {} + | sort -rh | head 

[You can modify the path / to replace with the path you need]

No comments: