Bash Scripting - 如何设置创建新文件的组? [英] Bash Scripting - How to set the group that new files will be created with?
本文介绍了Bash Scripting - 如何设置创建新文件的组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一个 bash shell 脚本,我想更改创建新文件的默认组.我知道您使用 umask
来更改权限.有什么适合团体的吗?
I'm doing a bash shell script and I want to change the default group that new files are created as. I know you use umask
to change the permissions. Is there something for the group?
推荐答案
newgrp
命令用于在登录会话期间更改当前组 ID.
The
newgrp
command is used to change the current group ID during a login session.
在该会话中创建的新目录将具有由命令设置的组 ID.
New directories created in that session will have the group ID set by the command.
newgrp
(1)
这篇关于Bash Scripting - 如何设置创建新文件的组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文