Disk usage on Sun OS 5.8

Hi All,

We have a Sun OS 5.8 server which has low disk space.

I need to find the largest files and determine if the can be gzipped or even deleted.

While I use du to check on file size, the list is huge, especially if 'n need to du from /

Also, du -h (which I use on Linux), doesn't work on SunOS.

man du only offers a few option, which doesn't address my issue.

Is there a effective way to identify which files are the largest (I.E. list them from largest to smallest), and where they are located (either using du or another command)?

Who is Participating?
usually I would go into each partition (i.e. /, /usr, /var ...) and do
du -sk * |sort -n
and see which is the largest subdirectory, then go into that and repet the du, this can be v time consuming, but it does work.
Another way is to run a find and look for files larger than a given size. i.e.
find / -type f -size +100000000
would list all files greater that 100Mb
you can look for tar files
find / -type f -name "*.tar"
or gzipped
find / -type f -name "*.gz"
m0nk3yzaAuthor Commented:
Hi liddler,

Thank again.

That's exactly what I was looking for.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.