[plug] find -exec
Lyndon Maydwell
maydwell at gmail.com
Mon Oct 24 23:18:18 WST 2005
Starting at a particular directory, I want to chmod all directories
755, and everything else 644.
I tried what I knew of find with (in bash)
code <<EOF
find dir/ -exec if [[ -d {} ]] ; then chmod 755 {} ; else chmod 644 {} ; fi \;
EOF
... but I obviously don't know what I'm doing :P
My guess is that I need to escape something or other, but instead of
trial and error, plug to the rescue.
Suggestions?
More information about the plug
mailing list