怎么批量设置文件和目录权限

WBOY
Release: 2016-06-13 09:58:44
Original
947 people have browsed it

如何批量设置文件和目录权限
现在的所有目录都是775,文件都是664
要全部改成目录755,文件改成644

要求所有子目录和子目录中的文件全改掉。

如何用一两句命令实现啊

------解决方案--------------------
cd /path/to/director/;
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template