Back to: Geek Stuff
Thursday, 21. january 2010.
Find files larger than X and delete them in Mac OS/Unix terminal
Another terminal oneliner I've just used to delete files larger than 10mb.
So if you need to delete some files larger than X mb on your Mac or some unix server, here is the simple oneliner to do it, in this example we're looking for files larger than 10mb in current folder (and subfolders, because find command is recursive) and delete them:
find ./ -size +10000000c -exec rm {} \;
And to be sure that you'll be deleting the right files, you can first list them like this:
find ./ -size +10000000c -exec ls -la {} \;
bananica.com | Branko Jevtić's piece of web
RSS feed
Recent posts
- Tuesday, 11. may 2010. First look at Navicat 9 for MySQL, Mac OS X version
- Thursday, 21. january 2010. Find files larger than X and delete them in Mac OS/Unix terminal
- Tuesday, 15. december 2009. Bananica.com - Finally!
- Monday, 14. december 2009. MySQL Find and Replace with helper tool that generates SQL for you
- Monday, 14. december 2009. Synchronize two folders on a Mac with Automator and Rsync
- Monday, 14. december 2009. Synchronize two folders on a Mac and other Unix Systems with Rsync
Recent comments
-
Wednesday, 28. juli 2010. ludo commented on Bob Dylan Live Sucks Typial comments from the types of drunk stoned idiots who when at Dylan gigs scream
and whistle shout their own selfish prefrences deafening other audience members and unsettling Bob. Why dont you just keep it quiet? - Sunday, 27. june 2010. Jamie commented on Synchronize two folders on a Mac and other Unix Systems with Rsync Be aware that the version of rsync that comes with OS X (10.6) ignores resource forks and other metadata unless you supply -E or --extended-attributes. That’s not perfect either and I tried to post further details but this site wouldn’t allow me.
-
Thursday, 22. april 2010. Crocodil commented on Synchronize two folders on a Mac with Automator and Rsync Marvelous !
I was searching such tutorial a long time ago, thanks so much :-)