为子文件夹中的文件设置文件权限

时间:2022-07-31 16:47:05

Using Linux Fedora 20, being in the parent folder, which contains a1, a2, a3, ..., a100 subfolders each with two files in it to which I want to assign a new permission, namely 664. That is I want todo something like chmod 664 -R * but this does not work. Subfolders themselves should not be touched.

使用Linux Fedora 20,位于父文件夹中,其中包含a1,a2,a3,...,a100子文件夹,每个子文件夹中有两个文件,我想为其分配一个新的权限,即664.这就是我想要的东西像chmod 664 -R *但这不起作用。不应触及子文件夹本身。

1 个解决方案

#1


1  

find $parent -type f | xargs chmod 664

#1


1  

find $parent -type f | xargs chmod 664