How can I delete everything in a folder that doesn't have a tag? Manually sifting through it is fairly unreasonable.
Modified 9 years, 3 months ago
Viewed 87 times
Add a comment |
mdfind 'kMDItemUserTags!=*' -onlyin . -0|xargs -0 rm
Or using tag:
find . -type f|while read f;do [[ $(tag -m \* "$f") ]]||rm "$f";done