#author("2017-03-19T09:56:08+00:00","default:yusami","yusami") #author("2020-07-05T05:52:07+00:00","default:yusami","yusami") #contents &tag(コマンド); * 情報 [#c7c7d539] * [[コマンド]] [#c7c7d539] - [[chmodでファイルのパーミッションを再帰的に変更する>http://doruby.kbmj.com/SK/20091029/chmod_1]] chmodで再帰的にファイルのパーミッションを変更するには、以下のようにします。 find ./ -type f -print | xargs chmod 644 特定のファイルのみ、の場合はこのようになります。 find ./ -name *.rhtml -type f -print | xargs chmod 644 - [[chmodでパーミッション変更。再帰オプション(-R)は実は使えなかった。。 - railtownの日記>http://d.hatena.ne.jp/railtown/20080930/1222741196]] $ find . -type f -exec chmod 644 \{\} \; - [[ディレクトリだけchmodで再帰的に変更する方法 - 浜村拓夫の世界>http://hamamuratakuo.blog61.fc2.com/blog-entry-491.html]] find /var/www/ -type d -exec chmod 755 {} \; - [[ファイルやディレクトリのパーミッションを一括で置換したい - Qiita>https://qiita.com/takeshi81/items/48ea62eae2fc7f1cb2f0]] こうすると一回の chmod で済みます。 chmod -R a=rX,u+w path/to/dir