find then chmod

This commit is contained in:
Randy8080 committed 2021-12-28 17:29:44 +08:00
1 parent dadf95368e
commit 8f9890a1ba
1 file changed
+1 -2
+1 -2
View File
@@ -225,7 +225,7 @@ $ chmod -R 644 /var/www/html/
$ chmod 644 .htaccess
$ chmod 644 robots.txt
$ chmod 755 /var/www/uploads/
$ chmod 755 `find /var/www/html -type d`
$ find /var/www/html -type d -exec chmod 755 {} \;
```
### Batch Change
@@ -233,7 +233,6 @@ $ chmod 755 `find /var/www/html -type d`
$ chmod -R 644 /your_path
$ find /path -type d -exec chmod 755 {} \;
$ find /path -type f -exec chmod 644 {} \;
$ chmod 644 `find /your_path -type f`
```
See: [Command Substitution](https://tldp.org/LDP/abs/html/commandsub.html)