iva*_*ras 33 unix linux bash file-permissions chmod
使用chmod
,我chmod +x *.sh
在当前目录中,但如果我想更改所有文件,包括具有sh文件扩展名的子文件夹中的文件,该怎么办?
chmod +x -R *
会工作,但我需要更多的东西 chmod +x -R *.sh
enn*_*ler 57
使用find:
find . -name "*.sh" -exec chmod +x {} \;
Run Code Online (Sandbox Code Playgroud)
尝试使用find与xargs的光荣组合.
find . -iname \*.sh -print0 | xargs -r0 chmod +x
Run Code Online (Sandbox Code Playgroud)
该.
是开始,在这种情况下,工作目录的目录.
归档时间: |
|
查看次数: |
27057 次 |
最近记录: |