Patrick Galbraith (capttofu) wrote,
Patrick Galbraith

Cleaning up OS X /core directory - path to disk liberation!

Today, I discovered where all my disk space is going. I use a Macintosh and pretty much live in either my home directory or /usr/local or /opt/local. I kept running out of space and having to move things around, 'make clean', get an external hard drive, etc. I happened to stumble upon a directory /cores:

patrick-galbraiths-macbook-pro:/ patg$ du -s cores/
79295824    cores/


Filesystem    1024-blocks      Used Available Capacity  Mounted on
/dev/disk0s2    118153176 112094368   5802808    96%    /
devfs                 107       107         0   100%    /dev
fdesc                   1         1         0   100%    /dev
map -hosts              0         0         0   100%    /net
map auto_home           0         0         0   100%    /home

patrick-galbraiths-macbook-pro:cores patg$ sudo rm -f cores/*

patrick-galbraiths-macbook-pro:/ patg$ df -k
Filesystem    1024-blocks     Used Available Capacity  Mounted on
/dev/disk0s2    118153176 71190080  46707096    61%    /
devfs                 107      107         0   100%    /dev
fdesc                   1        1         0   100%    /dev
map -hosts              0        0         0   100%    /net
map auto_home           0        0         0   100%    /home

Wow! I freed up 40GB! 

This is like Christmas!

And yes, I know, I should see why the heck I have so many core dumps going on, but for now, I'll rejoice in having some disk space!

I'm sure many of you who stumble upon this may already know this, but for those of you who don't, I hope the tip helps!
Tags: core files, disk space, do'h
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic