[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disk usage on Sun OS 5.8

Posted on 2006-04-19
2
Medium Priority
?
2,430 Views
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)?

Regards,
Jo
0
Comment
Question by:m0nk3yza
2 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 2000 total points
ID: 16488374
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"
etc
0
 
LVL 1

Author Comment

by:m0nk3yza
ID: 16488497
Hi liddler,

Thank again.

That's exactly what I was looking for.

Regards,
Jo
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 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