Mar. 28th, 2012

ibneko: (Default)
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.

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Jul. 3rd, 2025 03:56 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