Link to home
Start Free TrialLog in
Avatar of michofreiha
michofreihaFlag for Lebanon

asked on

Disk space

Hi all,
I have a SUN Solaris machine with the below specification regarding disk space...
bash-3.00# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0      6.5G   6.2G   170M    98%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   968M   1.4M   967M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                       6.5G   6.2G   170M    98%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                       6.5G   6.2G   170M    98%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   967M   552K   967M     1%    /tmp
swap                   967M    40K   967M     1%    /var/run
/dev/dsk/c1t0d0s7       60G    10G    50G    18%    /export/home

As you can see i have a problem on the / partition and need to free some space from it...I would like to ask please about how I can list all files in that partition ordered by size in order to delete them

Regards
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

check under /var dir for logs that are too big

cd /var
du -k . | sort -rn

this could be done from / as well
Avatar of yuzh
yuzh

I would use:
du -sk * | sort -nr
under / and /var
to check it out, as omarfarid alread point out, it could be the logs are too big. also you need to check /var/mail to see if the mail boxes are growing too big as well.
Avatar of michofreiha

ASKER

Dear Sir,

I found out a file under /var/mail that is taking a lot of space as you can see below:

ls -lrt
total 21842
drwxrwxr-x   2 root     mail         512 Dec 19 10:00 :saved
-rw-rw----   1 root     mail     11166522 May 15 07:05 root

Please let me know if i can remove and create this file again and how I can do that?

Regards
if you don't want to keep the email for root, you can login as root (or su as root) and do:
cat /dev/null > /var/mail/root
to get rid of all the emails for root.
PS: the mail box is not that big
have a look at /var/crash/<yourhostname> to see if any crash file in there, you can delete them.
also have a look at my answer in http:Q_20378148.html to see if you can free up more space.
Have a nice weekend!
I did everything you asked me to do...I have only win some MB...I need to free more
you should be able to see other big files. Did you look under /var/adm for messages* files?
Dear Sir,

please find below folders under /var/adm:

ls -lrt
total 264
-rw-rw-rw-   1 root     bin            0 Aug 25  2008 spellhist
-rw-------   1 uucp     bin            0 Aug 25  2008 aculog
drwxr-xr-x   2 adm      adm          512 Dec 19 10:00 exacct
drwxr-xr-x   2 adm      adm          512 Dec 19 10:00 log
drwxr-xr-x   2 root     sys          512 Dec 19 10:00 streams
drwxr-xr-x   2 root     sys          512 Dec 19 10:02 pool
drwxr-xr-x   2 root     sys          512 Dec 19 10:07 sm.bin
drwxrwxr-x   5 adm      adm          512 Dec 19 10:56 acct
drwxrwxr-x   2 adm      sys          512 Dec 19 10:56 sa
-rw-r--r--   1 root     root           0 Dec 19 11:15 vold.log
-rw-r--r--   1 root     root         423 Apr 14 09:16 messages.3
-rw-r--r--   1 root     root         792 Apr 23 13:00 messages.2
-rw-r--r--   1 root     root         282 May  3 10:04 messages.1
-rw-r--r--   1 root     root         996 May 10 16:00 messages.0
-rw-------   1 root     root        1393 May 14 14:29 sulog
-rw-r--r--   1 root     root           0 May 15 09:07 messages
-r--r--r--   1 root     root        2828 May 15 09:11 lastlog
-rw-r--r--   1 root     bin         4092 May 15 10:32 utmpx
-rw-r--r--   1 adm      adm       103044 May 15 10:32 wtmpx

Thanks
can you show the output of

du -k / | sort -rn
Dear Sir,

Please find attached a file that contains the size for all my file system

Regards
FIle-Size.txt
what do you have under /export/home/var ? it has 7.4 GB

7487651      /export/home/var

look for files that you can delete

Also look at xport/home/var/mya2billing , it has 2GB

2167449      /export/home/var/mya2billing
Dear omarfarid,
Files under /export/home/var are MySQL database files...I do not have a disk problem on this partition...The only issue that i have is on / as you can se below...I just still have 176MB free

Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0      6.5G   6.2G   175M    98%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   901M   1.4M   899M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                       6.5G   6.2G   175M    98%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                       6.5G   6.2G   175M    98%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   900M    56K   899M     1%    /tmp
swap                   900M    40K   899M     1%    /var/run
/dev/dsk/c1t0d0s7       60G   9.7G    50G    17%    /export/home
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial