第7题、第13题和第14题,希望详解

来源:3-18 【第三章测试题】学以致用是最好的学

慕斯7478070

2019-11-26

写回答

1回答

Oscar

2019-11-27

第 7 题:

less 命令,因为它会分页显示,而且支持查找,等等操作。


第 13 题:

用 -aG 参数啊。课程里都讲过的。

a 是 append 的缩写,表示“追加”。如果不用 -a 参数,单独用 -G 或 -g 参数,则会把用户从没有列出来的原来的群组里剔除。具体可以参见 man usermod

-g, --gid GROUP
The group name or number of the user's new initial login group. The group must exist.

-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.


第 14 题:

g 是 group 的缩写,表示“群组的其他用户”。+ 号表示“添加”权限。

o 是 other 的缩写,表示“其他用户”。- 号表示“移除”权限。

课程里都讲过的。

3
0

Linux核心技能与应用

一网打尽Linux必备核心技能,面试、升职必备的“敲门砖”。

2091 学习 · 692 问题

查看课程