chmod 递归修改权限_如何使用Chmod递归更改文件和目录权限

chmod 递归修改权限_如何使用Chmod递归更改文件和目录权限_第1张图片

chmod 递归修改权限

We have an archive which is archived by someone else and we want to change file and directory permissions. In order to change all sub files and directories permissions we need to run chmod recursively. Recursively means please apply given permissions all given files and folders and their sub files and folders.

我们有一个由其他人归档的归档文件,我们想更改文件和目录的权限。 为了更改所有子文件和目录的权限,我们需要递归运行chmod 。 递归意味着请对所有给定的文件和文件夹及其子文件和文件夹应用给定的权限。

-R或–递归选项 (-R or –recursive Option)

In order to change files and directories permissions recursively chmod provides recursive feature with -R or --recursive options. In this example we will change permissions to 720 recursively.

为了递归更改文件和目录权限, chmod递归提供带有-R--recursive选项的递归功能。 在此示例中,我们将递归将权限更改为720

$ chmod -R 720 /home/ismail/

检查当前权限 (Check Current Permission)

After we have converted read, write and execute permissions to 720 we can check the current status of the permissions with ls -l command. This will list new permissions in the first column.

将读取,写入和执行权限转换为720 ,可以使用ls -l命令检查权限的当前状态。 这将在第一列中列出新的权限。

$ ls -l

你可能感兴趣的:(linux,python,java,css,git)