TinyApps.Org
Small is beautiful


 HOME

  0. Internet
  1. Text
  2. Graphics
  3. System
  4. File
  5. Misc
  6. Palm
  7. OS X

 BLOG

 DOCS

 FAQ

 RSS (?)





Delete all files except... #
While importing a My Pictures directory from Windows XP into iPhoto via drag-and-drop, the process would crash after several thousand photos. I suspected iPhoto was choking on a non-JPG file, so I recursively deleted all other files in the directory:
Find all files but JPGs:
find . \( \! -iname "*\.jpg" \! -iname "*\.jpeg" -type f \) -print

Find all files but JPGs, and list them on one line:
find . \( \! -iname "*\.jpg" \! -iname "*\.jpeg" -type f \) -print0

Delete all files but JPGs:
find . \( \! -iname "*\.jpg" \! -iname "*\.jpeg" -type f \) -print0 | xargs -0 rm -f
Sure enough, after cleaning the directory of extraneous filetypes, the import worked flawlessly. Use the above commands at your own risk - unintended data loss is likely. As always: backup, backup, backup. (Thanks to Todd for his post, from which the above commands were largely lifted.)

/mac | Nov 15, 2007

Delete empty directories recursively #
A tiny Windows app for this purpose was mentioned a few years ago, but here are the Linux and OS X commands to recursively delete empty directories below the current one (use at your own risk, as the slightest mistake WILL destroy all of your data):
Linux: find -depth -type d -empty -exec rmdir {} \;
OS X: find ./ -depth -type d -empty -exec rmdir {} \;

/nix | Nov 07, 2007

CrashPlan - Insanely cool offsite backup for Windows, Mac, and Linux #
Readers of this blog (both of you!) will know that I am a long time fan of Mozy. Now that they've got their millions (bought out by EMC) there is a new, leaner and meaner kid on the block: CrashPlan. These guys take automatic offsite backup to the next level by allowing you to backup not only to their servers (for a monthly fee), but also to any number of computers for free. Those computers (as well as yours) can be running Windows, OS X, or Linux, and of course everything is encrypted. They have a super-cool, intuitive UI for all this - just check out the tour by Matthew.

/misc | Nov 05, 2007



Categories
/blosxom
/eink
/mac
/misc
/nix
/palm
/windows

Blosxom Archive
2013: 5 4 3 2 1
2012: 12 11 10 9 8 7 6 5 4 3 2 1
2011: 12 11 10 9 8 7 6 5 4 3 2 1
2010: 12 11 10 9 8 7 6 5 4 3 2 1
2009: 12 11 10 9 8 7 6 5 4 3 2 1
2008: 12 11 10 9 8 7 6 5 4 3 2 1
2007: 12 11 10 9 8 7 6 5 4 3 2 1
2006: 12 11 10 9 8 7 6 5 4 3 2 1
2005: 12 11 10

Blogger Archive
2005: 10 9 8 7 6 5 4 3 2 1
2004: 12 11 10 9 8 7 6 5 4 3 2 1
2003: 12 11 10 9 8 7 6

Ezine Archive
2004: 4 3 2 1
2003: 12 9 8 7 6 5 4 2 1
2002: 12 10 9 8 7 6 5 3 2 1
2001: 12 11 10