MacBook possessed by mystery entity
February 26, 2012 9:26 PM   Subscribe

So...I'm thinking my Mac has a virus. I have a Mac OS X 10.5.8. I keep running out of hard drive space and deleting files constantly, so I got Disk Inventory X to see where my space is. Turns out there is 20 GB of 130,000 text files on my computer in a hidden file marked "private". I can't see this "private" folder from the file manager...only from Disk Inventory X. What do I do?

I run iAntiVirus and Little Snitch. Nothing's showing up in iAntiVirus. Little Snitch wigs out from time to time but I usually just block mystery requests...

What's in that folder, anyway? Is it a MacGuffin? Can I see it?

Also: I'm paranoid, vaguely famous, and have been involved in politics.

Help! Thanks!!
posted by HylandErickson to Computers & Internet (9 answers total) 13 users marked this as a favorite
 
/private is, um, private. It's where the UNIXy core of OS X is kept, and hidden so that you don't delete it inadvertently. (My /private/ directory on 10.6.8 is 11GB.)

/private is also where OS X keeps its swapfiles, which can get you into the 'swap death spiral' where you don't have enough free space to swap, which generates more swapping. Try OnyX, perhaps, to clear out any temp files that should have been deleted but haven't.
posted by holgate at 9:35 PM on February 26, 2012


/private is a default folder in Mac OS X. Sometimes it fills up with logs and temporary files. It’s hidden because if you mess it with it, you can wreck your system. Don’t mess with it. No one is hacking you.
posted by tepidmonkey at 9:42 PM on February 26, 2012


My mom recently had this happen -- it was due to a runaway Google Software Update which had filled her hard drive with log messages. You can look in Console.app to seeing anything in particular is spitting out tons of messages, and google for how to clean your logs if this is the case. And yes, restarting is almost always helpful! (It clears out memory swap files, for example.)
posted by high5ths at 9:53 PM on February 26, 2012


Have you used an app like CleanMyMac? I run it on a monthly basis and it clears up 6-8gb of space regularly.
posted by beaucoupkevin at 9:56 PM on February 26, 2012 [8 favorites]


As the others have said, /private is where the core of your operating system is kept. At 130,000 files, it seems to be a bit larger than it should be (although I haven't used 10.5 in a long time, so my memory may be off). Most likely something is filling your log files. Two things you can do:
  1. If you haven't done so recently, restart. This will clean up your swapfiles (aka virtual memory). It will also reset any processes (such as the Google Software Update and Time Machine) that tend to fill log files.
  2. Check the size of /private/var/log. If this folder is larger than about 100mb (mine usually sits at less than 50mb), you can try deleting any files along the lines of [something].log.[number].bz2. Normally the computer will clean these up by itself (based on a schedule), but if something is constantly writing to the log files, they can fill up pretty quickly.
You can get to the hidden folder by using the "Go to folder" option under the "Go" dropdown menu when Finder is in focus and typing /private/var/log. Do not touch any other folders in /private. Bad stuff happens.
posted by thebestsophist at 10:06 PM on February 26, 2012 [2 favorites]


It's a long shot, but I'll add it because it took me a while to track down: Do you happen to have MySQL server running on this machine? I recently had a machine (not OS X) run completely out of disk space because MySQL was locking log files, and the system log rotation script couldn't delete the old ones. (Described here.) Solution was to run mysqladmin flush-logs or restart the MySQL server.
posted by usonian at 4:27 AM on February 27, 2012


This used to happen with an older version of Symantec Anti-Virus. The program created an ever increasing log file.
posted by Gungho at 6:14 AM on February 27, 2012


nthing the logfiles thing. usonian's story about MySQL filling the disk with log files is a rite of passage for lots of Mac web developers, and there are many other applications that can do this if they're ill-behaved and run into some sort of recurring problem while executing common tasks. (For example, some applications phone home to check for software updates; badly written ones log an error and immediately try again if they fail to contact their "home" server -- that can quickly lead to a log file that grows by the second until it's turned off.

As high5this said, the Console application (inside the Utilities folder in your Applications folder) lets you see what stuff is being logged, and will also let you pop open the /private/var/log folder in the Finder to see which files are actually sucking up all the space.
posted by verb at 6:40 AM on February 27, 2012


Try running a maintenance app such as Onyx or Cocktail. Both are free and are designed to delete unwanted log files, etc., especially stuff in the /private directory without danger of accidentally deleting vital files.

a friend in a similar situation to yours gained at least 5GB back after clearing out the old log files and other unnecessary files.

remember to make a full backup before using programs of this nature!
posted by kuppajava at 8:13 AM on February 27, 2012


« Older Lease vs. own to save money short term?   |   Noise therapy? Newer »
This thread is closed to new comments.