Mac OSX : Find large files by size
Mac OS X prompted me about my startup disk running out of disk space. I need a quick way to see which files need to be deleted and below are two ways that I used to search for large files.
1) Click on Finder icon
2) Select "All My Files", then navigate to "Show Search Criteria"
3) Click on the "Kind" selector and change to "File Size". If "File Size" is not available, select "Other..." and search for "File Size"
4) Enter let say for example, enter 10 MB and hit enter to start searching. It will take a while before you will see any result.
IF you prefer command line, open up your terminal and enter this line :
sudo find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
NOTE : Adjust the file size +100000k according to your own search criteria
NOTE : sudo is to invoke root access and you might need to enter your root password when prompted
Sample output :
/Applications/Firefox.app/Contents/MacOS/XUL: 136M
/Applications/Google: 103M
/Applications/Google: 103M
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/private/var/db/dyld/dyld_shared_cache_i386: 256M
/private/var/db/dyld/dyld_shared_cache_x86_64: 368M
/private/var/run/diagnosticd/dyld_shared_cache_i386: 256M
/private/var/run/diagnosticd/dyld_shared_cache_x86_64: 368M
/private/var/vm/swapfile0: 1.0G
/System/Library/Caches/com.apple.coresymbolicationd/data: 695M
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+8k Golang : Routes multiplexer routing example with regular expression control
+14.6k Golang : Adding XML attributes to xml data or use attribute to differentiate a common tag name
+11.9k Golang : Perform sanity checks on filename example
+22.4k Generate checksum for a file in Go
+25.7k Golang : How to read integer value from standard input ?
+11.5k Golang : Secure file deletion with wipe example
+7.5k Gogland : Where to put source code files in package directory for rookie
+11.8k Golang : Determine if time variables have same calendar day
+16.6k Golang : Get the IPv4 and IPv6 addresses for a specific network interface
+5.2k Golang : Generate Interleaved 2 inch by 5 inch barcode
+5.8k Golang : Use NLP to get sentences for each paragraph example
+47.8k Golang : How to convert JSON string to map and slice