Created
March 22, 2012 14:47
-
-
Save pwenzel/2158739 to your computer and use it in GitHub Desktop.
change permissions for all files and folders with xargs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change permissions for all files, skipping dirs | |
find . -type f | xargs chmod 664 | |
# change permissions for all dirs, skipping files | |
find . -type d | xargs chmod 775 |
for those not wanting to click on short links, @ole-tange's link points to https://en.wikipedia.org/wiki/Xargs#Separator_problem
I've ended up doing find . -type d -print0 | xargs -0 chmod 777
thx @ole-tange
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Beware of the separator problem: pi.dk/5