Thursday, May 1, 2008

find

One thing about sharing files between Windows and Mac via a USB is that the USB has to be formated in fat32. Then all the files copied from Windows will have the file mode x enabled. Manually removing it for each file is very cumbersome because for directories you do want to keep the x mode. This can be done easily using find
# find . ! -type d -exec chmod -x {} \;
Another example is
# find . ! -type d -exec xattr -d com.apple.quarantine {} \;

No comments: