![]() |
Help with chmod
How do I change filepermission for all .jpg images, folders and subfolders?
I want to change to 0777 for a short period while a script make some changes (some images have different owners) and then back to normal again. After the script is finished I want all folders to be 0755 and all .jpg images to be 0644. |
Code:
find /path/to/dir -name "*.jpg" -or -type d -print|xargs chmod 777Code:
find /path/to/dir -name "*.jpg" -print|xargs chmod 0644 |
Thanks,
Never seen it like this before. Can you explain how it's working? |
Quote:
Code:
chmod -R 777 /path/to/dirTo 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" -printxargs executes "chmod 0644" for each image |
| All times are GMT -7. The time now is 03:23 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123