Im using a program called Daisy Disk to see what is taking up space in my Mac and I find that the /cores directory is taking up 77gb.
Is that a problem? Can I get rid of it to regain the space?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityLong story short, it's safe to delete them.
The /cores
folder is where OS X stores Core Dumps. These are files that are intended for developers to trouble-shoot and diagnose faults in their software. They are generated as software crashes. If you're not a developer, or aren't testing software for a developer, then these files serve no purpose for you.
The files contain the state of the memory (or RAM) in your Mac at the time the crash happened. So lots of useful information for developers or testers to debug crashes. Not much use to anyone else.
By default, OS X is set up not to generate core dump files. If you type sudo launchctl limit core
in a Terminal window it will respond with the soft and hard size limits of dump files it is allowed to create. Soft limit means the default for each process, however processes can change this if they require but only up to the value of the hard limit. By default the values in OS X seem to be "0 unlimited" means that the operating system won't create core dumps by default, but processes can elect to have unlimited core dump files created if they wish.
You can change the setting on your machine by simply entering sudo launchctl limit core 0 0
to disable the feature entirely. sudo launchctl limit core 0 unlimited
will restore the default behaviour if it has been changed.
cd
command fails it'll delete files wherever the user is. This person may've deleted important files because of this. Either couple the commands with &&
instead of ;
(so it'll only run the second if the first succeeds), or use sudo find /cores -mtime +30 -type f -delete
to skip the cd
problem entirely.
Jan 4, 2020 at 5:21
launchctl limit core
show for core size allowances? By default you should have nothing there with a soft limit of 0 size. Did you perhaps enable core dumps or can trace what specific files are being placed there?