Removing all extended attributes from a directory tree

/ Published in: Bash
Save to your folder(s)

The space after the caret in the grep command is produced by typing Ctrl-V and then Tab, to insert a Tab character.

Copy this code and paste it in your HTML
  1. for i in $(ls -Rl@ | grep '^ ' | awk '{print $1}' | sort -u); do echo echo Removing $i ... >&2; find . -print0 | xargs -0t xattr -d $i 2>/dev/null ; done


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.