Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jessjessdrum

macrumors newbie
Oct 14, 2012
2
0
There's an app called FileCount in cydia. It took me hours to find it but it works greats and is easier than code and ssh.

----------

I know my post was 2 years late but when I google "find largest file on iPhone" this is the first post that comes up. So hopefully it will help anyone doin a similar search.
 

braddick

macrumors 68040
Jun 28, 2009
3,921
1,018
Encinitas, CA
There's an app called FileCount in cydia. It took me hours to find it but it works greats and is easier than code and ssh.

----------

I know my post was 2 years late but when I google "find largest file on iPhone" this is the first post that comes up. So hopefully it will help anyone doin a similar search.

It's actually called, "filecounter" for those looking. . .
 

andrewwynn

macrumors newbie
Oct 30, 2009
8
0
filecounter so not helpful shows the total used and free space.

df -hl will do that in 1 second and have much more useful info. knowing the single biggest file is very not helpful if you have any MOVIES on your phone.

though the complex gawk methods will work they also give you many thousands of files to look through and searching the entire hard drive is not super useful either.

the suggestion of using the 'du' command is the right way to go.

SSH into your phone and use this technique and it will save you time and energy if you know your way around terminal.

cd /var/mobile/Library

du -m * | sort -n | tail −15

that command will show you the 20 largest files in the current directory, listed in Megabytes.

example:

124 Mail/ExchangeActiveSync6D87CE7A-673D-4CFF-8809-5B63CECF2EAE
126 Caches/com.apple.AppStore
135 VoiceServices
135 VoiceServices/Assets
135 VoiceServices/Assets/en-US
135 WebClips
135 WebClips/VoiceServices
135 WebClips/VoiceServices/Assets
135 WebClips/VoiceServices/Assets/en-US
137 Assets/com_apple_MobileAsset_DictionaryServices_dictionary
159 Assets
167 Caches/com.apple.mobilesafari
251 Mail
271 Caches/MapTiles
846 Caches

far FAR cleaner and easier, you could even make an alias for the command.

the breakdown:

du -m * | sort -n | tail −15


{disk usage} {in megabytes} - > {sort} {numerically} -> {show last 15}

following the gawk method worked but created a 47MB file in my case that looked like this:


284033024 /private/var/mobile/Library/Caches/MapTiles/MapTiles.sqlitedb
133120000 /private/var/mobile/Library/Caches/com.apple.mobilesafari/Cache.db
128458752 /private/var/mobile/Library/Caches/com.apple.AppStore/Cache.db
106931800 /private/var/mobile/Library/WebClips/VoiceServices/Assets/en-US/synth_samantha_full_155mrf22_270_06.dat
106925556 /private/var/mobile/Library/VoiceServices/Assets/en-US/synth_samantha_full_155mrf22_270_06.dat
78270464 /private/var/root/Library/Caches/com.apple.coresymbolicationd/10B146


had 10,000+ lines. i had to grep out a ton of useless duplication.

The du command will work wherever you want or you can assign a directory in the command itself.

you can use it like this:

du -m / | sort -n | tail -20

to find the biggest 20 files on your entire iPhone. it will take quite a while to execute.

I found my syslog file grew to nearly 1/2GB! so i'm glad i did run the command on my full drive.

du -m /var/mobile/Library/ | sort -n | tail -15

results:

126 /var/mobile/Library/Caches/com.apple.AppStore
135 /var/mobile/Library/VoiceServices
135 /var/mobile/Library/VoiceServices/Assets
135 /var/mobile/Library/VoiceServices/Assets/en-US
135 /var/mobile/Library/WebClips
135 /var/mobile/Library/WebClips/VoiceServices
135 /var/mobile/Library/WebClips/VoiceServices/Assets
135 /var/mobile/Library/WebClips/VoiceServices/Assets/en-US
137 /var/mobile/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionary
159 /var/mobile/Library/Assets
167 /var/mobile/Library/Caches/com.apple.mobilesafari
251 /var/mobile/Library/Mail
271 /var/mobile/Library/Caches/MapTiles
846 /var/mobile/Library/Caches
1751 /var/mobile/Library/

beautiful!

FYI; especially for those who can't jailbreak; the VAAAAST majority of 'other' is SMS attachments. delete all your SMS threads and you'll gain tons of space.

if you are jailbroken you can go to /var/mobile/Library/SMS/Attachments and copy all those files to your computer and then delete them all. works out beautifully; when you view a message thread the image will be replaced with an empty bubble and the NAME of the file that's missing so you can use a simple 'find' in the finder to locate it.

My 'other' went from 8GB to 3.6GB. still sizable but 800MB of that is just caches between maps and safari. (also i do have a 64GB phone).

cheers and good luck cleaning up your other.
 

Naddel81

macrumors newbie
Aug 10, 2006
5
0
sorry for bumping the thread, but I get those "command not found" errors no matter which command I try:
sshiphone0jpsg.png



I just want to find the 20 biggest files to free some space.

best wishes and thanks for helping me out!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.