Showing posts with label head. Show all posts
Showing posts with label head. Show all posts

Wednesday, October 1, 2008

List largest (or smallest) files

If you want to find the largest files in a directory which are consuming precious space, you can use the following command:

openSuSEServer:~ # du -kh /var | sort -n | tail

then, to sort the smallest files, use the inverse command:

openSuSEServer:~ # du -kh /var | sort -n | head