Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use an 'rmdir' function that's smart about .DS_Store files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use an 'rmdir' function that's smart about .DS_Store files
Authored by: lar3ry on Dec 22, '09 09:34:30AM

This looks like an excellent use for Perl rather than shell programming, as Perl has all the necessary functions within it so that you don't need to invoke the overhead of a fork for the rmdir, find, temp file, etc.

Unfortunately, debugged Perl script is about 100 lines long.

Interesting idea, though. Thanks!



[ Reply to This | # ]
Use an 'rmdir' function that's smart about .DS_Store files
Authored by: luomat on Dec 22, '09 10:25:20AM

Go ahead and convert this to perl and tell me what you plan to do with the spare cycles that you save.

This is a tiny little script you're going to run, what, once per day? Maybe, MAYBE, on a really heavy day, you'd run it 20 times.

Actually, let me do it for you:

# date;time rmdir.sh test;date
Tue Dec 22 13:23:41 EST 2009
rmdir: removed test
rmdir.sh test 0.00s user 0.02s system 11% cpu 0.217 total
Tue Dec 22 13:23:42 EST 2009



[ Reply to This | # ]