Remove hidden core dump files to restore drive space

Oct 03, '03 10:35:00AM

Contributed by: Anonymous

A few months ago, I had a crash involving iTunes from which I could recover after the usual fsck at restart. However, one thing would not come back: 1.4Gb of my hard disk seemed to be lost. I tried many attempts with Norton Disk Doctor, File Buddy, etc., to locate new files and solve the issue. Just today, I finally found the culprit.

There's a hidden folder in OS X called /cores. This folder contains core.XXX (with XXX being a number) files which apparently are images of the computer memory that are left for debugging reasons after crashes or forced restarts. In my case, about 30 files of weights ranging from 30 to 70Mb were present.

Although I couldn't find a way to avoid these files from being created, I found an easy way to delete them. First, you'll need to run as root. You can access the /cores folder through the Go -> Go to folder... menu, and then type "/cores." Now, trash the size-eaters, and restart. Done, happy again.

[robg adds: In looking at the cores folder on my machine, I fond only one file, but it was 933mb in size (from April, 2003)! I was going to use the Terminal to trash it, but noticed that my admin account was the owner. So I just dragged it to the trash from the Finder (just to make sure it worked), emptied the trash, and bingo, 1gb of drive space was restored. So in my case, root wasn't required. Even if it were, you might find it easier (and safer) to just delete the files from the Terminal (after doing cd /cores) by typing sudo rm name_of_core_file.]

Comments (16)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031001203255412