|
|
10.4: Find potential duplicate files via Spotlight metadata
On the previous rewrite of the hint, the command
md5sum is not a standard MacOS/Darwin command. I rewrote the script to use /sbin/md5. Also, rather than calling mdls three times, I rewrote the script to call it once. Then, I fixed the mdfind conditions (one had "=" and I changed it to "=="). Finally, rather than using sed, which has a lot of processing overhead, I am using cut to do the same thing. Overall, it cut a bit more than one second off the command execution on my system. So, without further ado, here's my updated script:
I love squeezing every last bit of efficiency out of scripts!! Scott
10.4: Find potential duplicate files via Spotlight metadata
Oops... ignore the comment on using
$(..) because it did not work. But other than that, it still cuts a bit more than a second off the search on my Powerbook G4!
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|