Disk usage on Sun OS 5.8

Posted on 2006-04-19
Last Modified: 2013-12-27
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)?

Question by:m0nk3yza
    LVL 18

    Accepted Solution

    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"
    LVL 1

    Author Comment

    Hi liddler,

    Thank again.

    That's exactly what I was looking for.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now