我需要一个Bash脚本来更改目录和所有子目录中所有文件的文件权限。它的行为应如下所示:
for each file in directory (and subdirectories)
if i am the owner of the file
if it is a directory
chmod 770 file
else
chmod 660 file
Run Code Online (Sandbox Code Playgroud)
我想这不是一个艰巨的任务,但是我对Bash脚本没有很丰富的经验。感谢您的帮助!:D
我有一个正在处理的新项目,我已经为此项目/目录创建了一个 git 存储库。该项目在我办公室的机器上,它始终在运行且可访问。现在我想从中创建一个裸存储库,我可以将其用作“服务器”以通过 ssh 从我的家用机器复制/复制到我的家用机器。我试过
git clone --bare project project.git
Run Code Online (Sandbox Code Playgroud)
它从我的工作目录创建了一个裸存储库,但没有为新的裸存储库设置远程或分支。但是当我切换到新的回购
git remote -v
Run Code Online (Sandbox Code Playgroud)
给我
origin /home/auron/project (fetch)
origin /home/auron/project (push)
Run Code Online (Sandbox Code Playgroud)
这基本上与我想要的相反。我怎样才能达到我想要的?