2016-02-16 59 views

回答

1

使用此:

find /path -type f -name configuration.php -exec chmod 444 {} \; 

您也可以通過多條路徑找到:find /path1 /path2 ...

2

東西沿着線:

SERVERS="server1.example.com server2.example.com server3.example.com" 

COMMAND_TO_RUN="find . -name configuration.php | xargs chmod 700" 

for SERVER in "$SERVERS" 
do 
    ssh SERVER <<EOF 
    "$COMMNAD_TO_RUN" 
    EOF 
done 
0

你可以試試:

find/-name "configuration.php" -exec chmod 444 {} \; 

(我還沒有測試過這個語法。)

相關問題