摘要:
linux中当目录具有SGID权限时, 任何用户在该目录中创见的文件将自动继承该目录的所属组。 测试。 1、普通用户家目录创建一个普通文件, 观察文件的所属组 [liujiaxin01@rhel7pc1 ~]$ ls [liujiaxin01@rhel7pc1 ~]$ whoami liujiaxi 阅读全文
posted @ 2022-04-10 18:07
小鲨鱼2018
阅读(324)
评论(0)
推荐(0)
摘要:
1、问题 2、解决方法,切换至root用户,修改/etc/sudoers配置文件 [root@rhel7pc1 ~]# vim /etc/sudoers ………… ## The COMMANDS section may have other options added to it. ## ## Al 阅读全文
posted @ 2022-04-10 17:33
小鲨鱼2018
阅读(131)
评论(0)
推荐(0)
摘要:
1、linux中文件或者目录的权限针对用户分为三类,即: 所有者,用u表示; 所属组,用g表示; 其他人,用o表示; 针对每一种用户,权限有可以分为三种,即: 读的权限,用r表示,也用数字4代替。 写的权限,用w表示,也用数字2代替。 执行的权限,用x表示,也用数字1代替。 2、举例 文件a.txt 阅读全文
posted @ 2022-04-10 16:45
小鲨鱼2018
阅读(2630)
评论(0)
推荐(0)
摘要:
1、 -: 普通文件。 d: 目录文件。 l: 链接文件。 例如:软连接 b: 块设备文件 例如:硬盘 c: 字符设备文件 例如: 系统外设, 鼠标、键盘等。 p: 管道文件 ??? 阅读全文
posted @ 2022-04-10 16:15
小鲨鱼2018
阅读(276)
评论(0)
推荐(0)
摘要:
1、 [root@rhel7pc1 test]# ls a.txt [root@rhel7pc1 test]# cat a.txt 1 k d f 2 x c g 3 z c b 4 f i j 5 e d g 6 i j e [root@rhel7pc1 test]# sed '/x/, +1d' 阅读全文
posted @ 2022-04-10 14:52
小鲨鱼2018
阅读(86)
评论(0)
推荐(0)
摘要:
1、 [root@rhel7pc1 test]# ls a.txt [root@rhel7pc1 test]# cat a.txt 1 k d f 2 x c g 3 z c b 4 e w e 5 z c x 6 e d g 7 i j e [root@rhel7pc1 test]# grep - 阅读全文
posted @ 2022-04-10 14:42
小鲨鱼2018
阅读(102)
评论(0)
推荐(0)
摘要:
1、 [root@rhel7pc1 test]# ls a.txt [root@rhel7pc1 test]# cat a.txt 1 k d f 2 x c g 3 z c b 4 e w e 5 z c f 6 e d g [root@rhel7pc1 test]# sed -n '/x/{n; 阅读全文
posted @ 2022-04-10 14:24
小鲨鱼2018
阅读(393)
评论(0)
推荐(0)
摘要:
1、测试数据 [root@rhel7pc1 test]# ls a.txt [root@rhel7pc1 test]# cat a.txt ## 测试数据 1 k d f 2 x c g 3 z c b 4 e w e 5 z c f 6 e d g 2、删除匹配行及其下一行 [root@rhel7 阅读全文
posted @ 2022-04-10 14:02
小鲨鱼2018
阅读(1269)
评论(0)
推荐(0)

浙公网安备 33010602011771号