Quote:
Originally Posted by Calvinguy
Thanks,
Never seen it like this before. Can you explain how it's working?
|
I assume you've seen stuff like:
Code:
chmod -R 777 /path/to/dir
which for your 1st phase would work fine (except that it would chmod everything to 777 not just jpg's and directories).
To reverse it you can't run a recursive chmod because you need different
chmod for files and directories
Code:
find /path/to/dir -name "*.jpg" -print
finds all images in that directory and prints them
xargs executes "chmod 0644" for each image