Something is taking up space on my drive, but it's not there?

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
This is odd. Disk utility says that I'm using 180gb of data on my disk, yet when I add up all of the folders under my Hard Drive, they only add up to 99gb. THEN, if I get info on my Hard Drive itself, it also says it's using 180gb!

Somewhere, I have 80gb that is just lazing around and taking up MY precious space.

How can I search for the biggest FOLDERS, not just files, on my drive? Is there a way that maybe it got deleted but didn't free up space? If so, how can I get it back?

Thanks.
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
I've repaired the disk plenty of times.

OK, here's what I figure. Since the Hard Drive is taking up more space than the folders inside it, it clearly means that the culprit is invisible folders under /.

I did a ls -a and there are about a HALF DOZEN "From Old Mac" folders! I'm on my third mac and I've done many restores with Time Machine, can I throw these out safely?

Is there a way I can list folders by size in terminal?

Only half of the hidden folders has a . in front of it, they are:

.DS_Store
.DS_Store (from old Mac)
.Spotlight-V100
.Trashes
.com.apple.timemachine.supported
.com.apple.timemachine.supported (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac)
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 3
.com.apple.timemachine.supported (from old Mac) 3 (from old Mac)
.com.apple.timemachine.supported (from old Mac) 4
.file
.fseventsd
.hotfiles.btree
.vol
 

bplein

macrumors 6502a
Jul 21, 2007
518
187
Austin, TX USA
Disk Inventory X hasn't been updated since 2005. Use GrandPerspective.
Either tool will help him find the problem. The default visualization for Disk Inventory X seems to work better for me (organized by file type) than Grand Perspective, but the latter is more configurable. But it's also slower to scan the folders, which I find interesting (newer doesn't mean better in some respects).
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
Um...I did find the problem...if anybody read my last post, one of the invisible files is taking up an awful lot of room.

How can I list folders by size in terminal, and then see how big they are?

Is it safe to delete all of the ones that say "from old mac"?
 

bplein

macrumors 6502a
Jul 21, 2007
518
187
Austin, TX USA
Only half of the hidden folders has a . in front of it, they are:

.DS_Store
.DS_Store (from old Mac)
.Spotlight-V100
.Trashes
.com.apple.timemachine.supported
.com.apple.timemachine.supported (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac)
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac) (from old Mac)
.com.apple.timemachine.supported (from old Mac) 2 (from old Mac) 2
.com.apple.timemachine.supported (from old Mac) 3
.com.apple.timemachine.supported (from old Mac) 3 (from old Mac)
.com.apple.timemachine.supported (from old Mac) 4
The .com entries above are files, not folders, and while they could be cleaned up, they aren't using up your space.

Check the size of .Trashes as well.

Better yet, download one of the tools mentioned above, and you'll get a graphical representation of the large files and the large folders on your system.
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
How can I check the size in terminal?
Edit: Trashes is zero. How can I sort the files and folder in order of size?
 

bplein

macrumors 6502a
Jul 21, 2007
518
187
Austin, TX USA
How can I check the size in terminal?
Edit: Trashes is zero. How can I sort the files and folder in order of size?
To get the last 100 lines (100 largest directories)
Code:
sudo du /Volumes/Macintosh\ HD/ | sort -n | tail -n 100
To get them all to a file called foo.txt

Code:
sudo du /Volumes/Macintosh\ HD/ | sort -n >foo.txt
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
OK, so the four folders in / are Applications, Library, System and User, as you'd expect.

These four folders add up to 100gb. The / drive comes out to 160gb. So those invisible files are doing something not-so economical. Are any of those files not supposed to be there? Should I delete anything in any of them? I've never heard of 60gb going to system files!
 

bplein

macrumors 6502a
Jul 21, 2007
518
187
Austin, TX USA
Well, the numbers reported are in blocks... so are you doing the math to convert from blocks to GB? If it shows a number that looks like 100 million, it's actually 50GB.

You need to scroll up in that file output and see what directories under each of those are using up space.

also, post the output of the following here:
Code:
sudo ls -lah /
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
I'm don't mean the number that the terminal spits out, I mean what Get Info tells me.

total 36853
drwxrwxr-t 42 root admin 1.5K Feb 18 00:28 .
drwxrwxr-t 42 root admin 1.5K Feb 18 00:28 ..
-rw-r--r--@ 1 Cheeto admin 21K Feb 28 22:10 .DS_Store
-rw-rw-r-- 1 root admin 15K Aug 28 2009 .DS_Store (from old Mac)
drwx------ 3 root admin 102B Dec 10 12:48 .Spotlight-V100
d-wx-wx-wt@ 2 root _unknown 68B Dec 10 12:29 .Trashes
-rw-r--r-- 1 root admin 0B Feb 18 00:28 .com.apple.timemachine.supported
-rw-r--r-- 1 root admin 0B Oct 19 2008 .com.apple.timemachine.supported (from old Mac)
-rw-r--r-- 1 root admin 0B Oct 19 2008 .com.apple.timemachine.supported (from old Mac) (from old Mac)
-rw-r--r-- 1 root admin 0B Oct 19 2008 .com.apple.timemachine.supported (from old Mac) (from old Mac) (from old Mac)
-rw-r--r-- 1 root admin 0B Oct 19 2008 .com.apple.timemachine.supported (from old Mac) (from old Mac) 2
-rw-r--r-- 1 root admin 0B Mar 28 2009 .com.apple.timemachine.supported (from old Mac) 2
-rw-r--r-- 1 root admin 0B Mar 28 2009 .com.apple.timemachine.supported (from old Mac) 2 (from old Mac)
-rw-r--r-- 1 root admin 0B Mar 28 2009 .com.apple.timemachine.supported (from old Mac) 2 (from old Mac) (from old Mac)
-rw-r--r-- 1 root admin 0B Mar 28 2009 .com.apple.timemachine.supported (from old Mac) 2 (from old Mac) 2
-rw-r--r-- 1 root admin 0B Feb 19 2009 .com.apple.timemachine.supported (from old Mac) 3
-rw-r--r-- 1 root admin 0B Feb 19 2009 .com.apple.timemachine.supported (from old Mac) 3 (from old Mac)
-rw-r--r-- 1 root staff 0B Jul 13 2009 .com.apple.timemachine.supported (from old Mac) 4
---------- 1 root admin 0B Jun 23 2009 .file
drwx------ 143 root admin 4.7K Feb 28 18:28 .fseventsd
-rw-------@ 1 root wheel 128K Feb 24 07:01 .hotfiles.btree
drwxr-xr-x@ 2 root wheel 68B May 18 2009 .vol
drwxrwxr-x+ 63 root admin 2.1K Feb 24 19:44 Applications
drwxrwxr-t+ 61 root admin 2.0K Jan 12 11:18 Library
drwxr-xr-x@ 2 root wheel 68B Jun 23 2009 Network
drwxr-xr-x 8 root wheel 272B Dec 10 15:52 System
drwxr-xr-x 5 root admin 170B Feb 23 16:43 Users
drwxrwxrwt@ 4 root admin 136B Feb 28 21:53 Volumes
drwxr-xr-x@ 39 root wheel 1.3K Dec 10 15:51 bin
drwxrwxr-t@ 2 root admin 68B Jun 23 2009 cores
dr-xr-xr-x 3 root wheel 4.1K Feb 20 22:17 dev
lrwxr-xr-x@ 1 root wheel 11B Dec 10 12:38 etc -> private/etc
dr-xr-xr-x 2 root wheel 1B Feb 20 22:17 home
-rw-r--r--@ 1 root wheel 18M Nov 3 12:40 mach_kernel
dr-xr-xr-x 2 root wheel 1B Feb 20 22:17 net
drwxr-xr-x@ 6 root wheel 204B Dec 10 12:43 private
drwxr-xr-x@ 64 root wheel 2.1K Dec 10 15:51 sbin
lrwxr-xr-x@ 1 root wheel 11B Dec 10 12:38 tmp -> private/tmp
drwxr-xr-x@ 15 root wheel 510B Dec 13 00:05 usr
lrwxr-xr-x@ 1 root wheel 11B Dec 10 12:38 var -> private/var
Cheetos-MacBook-Pro:~ Cheeto$
 

filmweaver

macrumors regular
Dec 13, 2008
116
0
This may be a dumb question but do you have VMWARE installed with windows? I do and it takes about 70Mb of space that is not reported to OS-X.
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
No, I have VirtualBox that DOES report the 7gb virtual disk. This problem is recent, the space just started disappearing. You know, the same damn thing happened with the flash drive I was using in OS X. What gives, Apple?! This is the kind of crap that forced almost 1 person a day to hire me to install their new larger drive because it only had 3gb left and was running slower than a "decommissioned" race horse.

One of these invisible files or folders, including var etc and usr and such, is hogging room. NONE of these should EVER get this large.
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
XD well I was capable enough to use the Terminal, you tell me, bud.
 

bplein

macrumors 6502a
Jul 21, 2007
518
187
Austin, TX USA
I dunno, we're not really getting clear info from you. I had you run the CLI from Terminal, but then you gave me numbers from Get Info.

Thanks for giving me that last output, though. Just wanted to see if something was sitting in the root directory itself.

When you did the big "du" to a file, can you send the last 100 lines to us here?

Do the "tail -n 100" and paste it here. Check through it first to make sure there's nothing in it that you don't mind sharing with the world.

If 100 lines doesn't do it, we may ask for 1000.
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
Um, can you clear that up? What files do I perform that on? When i did it with -n 100 it listed EVERY subfolder, not just 100 XD can you type the exact command?
 

Hal Itosis

macrumors 6502a
Feb 20, 2010
901
4
Um, can you clear that up? What files do I perform that on? When i did it with -n 100 it listed EVERY subfolder, not just 100 XD can you type the exact command?
Here, this will do folders one level deep:

sudo du -hxd1 /

Then (for example), if that reveals /private to be extra large... run it again on /private:

sudo du -hxd1 /private

(etc)
 

MrCheeto

macrumors 68030
Original poster
Nov 2, 2008
2,966
0
@foul breath, what would you consider to be too large, measuring in blocks if that is what terminal displays.
 

Hal Itosis

macrumors 6502a
Feb 20, 2010
901
4
@foul breath, what would you consider to be too large, measuring in blocks if that is what terminal displays.
Well... show us sudo du -hxd1 / so we can see what to call 'too large'.

[btw, the h option makes for 'human-readable' sizes (like gb mb kb etc), not blocks.]