递归chmod目录或文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了递归chmod目录或文件相关的知识,希望对你有一定的参考价值。

This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

find . -type d -exec chmod 755 {} ;


Similarly, the following will chmod all files only (and ignore the directories):

find . -type f -exec chmod 644 {} ;
  1. // This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.
  2. find . -type d -exec chmod 755 {} ;
  3.  
  4. // Similarly, the following will chmod all files only (and ignore the directories):
  5. find . -type f -exec chmod 644 {} ;

以上是关于递归chmod目录或文件的主要内容,如果未能解决你的问题,请参考以下文章