UNIX & Linux Forums

UNIX & Linux Forums (https://www.unix.com/index.php)
-   AIX (https://www.unix.com/aix/)
-   -   Running out of space (https://www.unix.com/aix/178799-running-out-space.html)

Spellbound 03-13-2012 03:41 PM

Running out of space
AIX 6.1
Of course, right at the end of the day I see that my "/" file system is just about out of space. I've been googling and reading man pages, but my google-fu is weak today. How do I find out what is taking all the space? I think I found the process that is cause *some* file to grow but I can't find it. I'm down to 23mb free!

Any help/direction would be greatly appreciated!

Skaperen 03-13-2012 04:26 PM

The "du" command is a good start. Piping it through awk to select files larger than a certain size would be one way to work with it.

Scrutinizer 03-13-2012 04:39 PM

Another option would be

du -ks */
I gives you a total per directory so you can often quickly zoom in on the directories with the highest usage and work your way down..

du -ks * | sort -rn
to include files in the directory too and sort according to size

zxmaus 03-13-2012 11:24 PM

look into your root homedir - usually /root - if there are any large files or cores which can be deleted. If you use smitty a lot you might want to shrink the logfiles.


Spellbound 03-14-2012 10:28 AM

Scrutinizer, that was exactly what I was after! Although I did use -gs and -ms to drill it down (lol...gb's and mb's are easier to deal with).

zxmaus, I did go through and get rid of a bunch of log files.

Skaperen, I did try that but the information returned was too much to deal with effectively

Thanks everyone!

From a new to Unix Windows guy!

Corona688 03-14-2012 11:33 AM


Originally Posted by Spellbound (Post 302607401)
Skaperen, I did try that but the information returned was too much to deal with effectively

Of course it is; that's why they suggested filtering the output with awk or other tools. :) You'll have fun exploring just how much these things can do for you, I'm sure. A small illustration:


$ du -hs ./* # Sizes of all files or folders in our CD-backup folder
269M    ./03-part
2.1G    ./P4_class_disc_image_Jan_05.iso
1.7G    ./accounting
2.1G    ./adobe
0      ./editor
4.5G    ./educational
277M    ./efiche-.....iso
1.1G    ./games
1.7M    ./zzz-backup.iso
785M    ./jamaica-tape
1.2G    ./map
530M    ./music-cd.iso
6.7G    ./office
3.5G    ./osx
6.4G    ./utility
2.4G    ./w7
19G    ./windows

# All sizes over 5 gigabytes
$ du -hs ./* | awk '/G/ { sub(/G/, "", $1); if($1 > 5) { $1=$1 "G"; print } }'
6.7G ./office
6.4G ./utility
19G ./windows


It would have actually been easier to do that without human-readable output. I had to match all sizes with G in them, strip the G off, compare the size, put the G back and print the lines I wanted. If it was in 1K blocks, I could have done it with ... | awk '$1 > 5000000' and that'd be it. Awk is designed to deal with tabular data.

Machine-readable output is fun. ;)

Spellbound 03-14-2012 12:03 PM

Thanks for the reply! I must be missing something very basic here...<the joys of being a n00b>. When I do a df -m it shows that / has 1728mb blocks with 32.16mb free. So the question now is...what the heck does "/" consist of? In Windows it would be all files not in any folders. I'm trying to determine what is taking that space.

Thanks as always!

All times are GMT -4. The time now is 12:06 AM.

UNIX and Linux Forums
Search Engine Optimisation provided by DragonByte SEO v2.0.32 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Unix & Linux Forums Content Copyright©1993-2017. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums