chmod递归修改权限_如何使⽤Chmod递归更改⽂件和⽬录权
限
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
Check Current Permission
检查当前权限
怎么申请使⽤Find命令设置递归权限(Setting Recursive Permissions with Find Command)
We can create similar effect to the recursive option of the chmod . We will use find command which is used to find and filter files and directories and than execute command with their names. We can list all or some of the files and directories with find and than run chmod command one by one to the filtered list. In this files we will change all files those ends with
.txt extension to the 720 .
我们可以创建与chmod的递归选项类似的效果。 我们将使⽤find命令,该命令⽤于查和过滤⽂件和⽬录,然后使⽤其名称执⾏命令。 我们可以使⽤find列出所有或某些⽂件和⽬录,然后逐个运⾏chmod命令到过滤列表。 在此⽂件中,我们将所有以.txt扩展名结尾的⽂件都更改为720 。
$ find /home/ismail -print -exec chmod 720 {} \;
了解更多Windows Robocopy命令教程,并提供以安全⽅式复制⽂件的⽰例
chmod 递归修改权限
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论