ibneko: (Default)
[personal profile] ibneko
Here's a one-liner to remove xattr from files in a directory on MacOS X. (Mostly to quickly strip out the annoying quarantine flag set on downloaded files).

for i in $(ls -Rl@ | grep '^ ' | awk '{print $1}' | sort -u); do echo Removing $i ... >&2; find . | xargs xattr -d $i 2>/dev/null ; done

Note the space after the ^ should be typed with control-v, then tab (to insert a proper tab).

Found this over at http://zzamboni.org/brt/2008/05/07/removing-all-extended-attributes-from-a-directory-tree/index.html. Posting it here so I don't lose the stupid thing again.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Jul. 17th, 2025 09:16 pm
Powered by Dreamwidth Studios
January 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2021