No products in the cart.
- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
I am working on a Linux production server and the client wants to be able to find the largest files on the system to make sure they are not taking up too much space.
I found this command: sudo du -a / 2>/dev/null | sort -n -r | head -n 20, but it gives the largest directories, not files.
Does anyone know what command can find the largest files?
Thanks
The following solution using find should meet your requirements:
# find / -type f -print0 | du -h --files0-from=- 2>/dev/null | sort -h -r | head -n 20