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


Click here to return to the 'Create Placeholders for downloaded files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create Placeholders for downloaded files
Authored by: Magnus Dredd on Mar 13, '11 09:09:07PM

You're correct.

The following will show what will be removed:
find . -exec mdls -name kMDItemFSLabel {} \; -exec mdls -name kMDItemFSName {} \; | awk -F " = " ' $2 == "1"{ getline; print $2 }' | sed -ne '/^".*/p' | awk '{ print "rm "$0"; touch "$0 }'

Will do it:
find . -exec mdls -name kMDItemFSLabel {} \; -exec mdls -name kMDItemFSName {} \; | awk -F " = " ' $2 == "1" { getline; print $2 }' | sed -ne '/^".*/p' | awk '{ print "rm "$0"; touch "$0 }' | bash

The command has been updated in response to a comment below.



[ Reply to This | # ]
Create Placeholders for downloaded files
Authored by: crarko on Mar 15, '11 05:57:02AM

I've edited the hint to reflect these corrections. Thanks!

Craig A.



[ Reply to This | # ]