Will this command work? chmod -R 644 *.php
Will this command work? chmod -R 644 *.php
I am trying to change all php files to 644 in the directory I am in now and all directories under it. |
Hello abefrorman!
Quote:
Hope this helped, Boby! |
If the goal is to change only files that end with ".php" in the current directory and all subdirectories, then you'll need something else.
As Boby mentioned, the original command "chmod -R 644 *.php" will only chmod files in the current directory that end with ".php" Boby's command will recursively chmod any file beneath the specified directory (no matter what extension the file has). The find command is probably the right tool for the job: Code:
find /top/level/directory -type f -name "*.php" -exec chmod 644 {} \; |
Code:
find /top/level/directory -type f -name "*.php" -print | xargs chmod 644 |
All times are GMT -5. The time now is 12:16 AM. |