【物联网开发环境与工具】Linux作业
0.先进入root,才有权限执行以下操作
一、用户&组
-
创建组group1,组id为550;group2,组id为551
cat /etc/group可以查看创建的组
-
新建用户tester1,id为510,备注信息’The weather is hot’, 所属组为group1
cat /etc/passwd可以查看创建的用户
-
新建用户tester2,所属组为group1
cat /etc/passwd可以查看创建的用户
-
将tester1的id改为520,用户名改为tester3
cat /etc/passwd可以查看创建的用户
-
将tester2的所属组改为group2
cat /etc/passwd可以查看创建的用户
6.删除组group1
二、目录管理
-
在/home下面新建一个文件夹test
-
在test文件中新建a.txt
-
将上述的a.txt复制到/tmp中
-
将/home的a.txt 重新命令为newA.txt
三、文件查看&查找
-
将/etc/profile复制到/home中
-
查找profile中的 ‘then’
-
在home文件夹下面查找包含’id’关键字,返回满足条件的文件夹
-
在整个系统下面查找日志的路径(日志的后缀为.log)
四、权限
-
将/home/profile的文件权限改为 u为可读可写可执行 g为可读 o为可读
先查看权限:u为可读可写不可执行 g为可读 o为可读
执行
则
-
将/home/profile的文件拥有者改为tester【需要存在tester这个用户】
-
将/home/profile的文件所在组改为group1【需要存在group1这个组】