?

Log in

No account? Create an account

Previous Entry | Next Entry

find(1)

I was just faced with a problem. Over time, I had accumulated about 2000 directories called ".AppleDouble", and wanted rid of them and all the items they contained. Thing is, they were scattered all over my hard disk and I couldn't be bothered to navigate to each one and delete it.

Spent about 10 minutes reading the manpage for find(1), and eventually found that I could write this tiny line to do the entire job for me...

find /storage1 -type d -name .AppleDouble -exec rm -rfv {} \;

Wow. Just... wow.

Comments

( 2 comments — Leave a comment )
bigme
Sep. 24th, 2007 11:28 pm (UTC)
well now i didn't know you could do that!


Thing is some of the .AppleDouble things are very useful as you need them for classic stuff.
idigital
Sep. 25th, 2007 08:32 am (UTC)
Nearest Classic-capable device I own is 260 miles away. And isn't even a PowerPC machine.
( 2 comments — Leave a comment )