码迷,mamicode.com
首页 >  
搜索关键字:第五周作业    ( 112个结果
2016-9-4第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;#grep--color-E"^(root|fedora|user1).*‘/etc/passwd|cut-d:-f1,72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();grep--color-E"[[:alnum:]]+\(\)"/etc/rc.d/init.d/functionsgrep..
分类:其他好文   时间:2016-09-04 17:47:10    阅读次数:197
第五周作业
本周作业内容:1、显示当前系统上root、fedora或user1用户的默认shell;答:[root@localhost~]#cat/etc/passwd|egrep‘^(root|fedora|user1)‘ root:x:0:0:root:/root:/bin/bash [root@localhost~]#2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:he..
分类:其他好文   时间:2016-09-04 17:46:47    阅读次数:210
马哥2016全新Linux+Python高端运维班第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;答:需要找到3个字符串,需要用到“或”命令,所以使用egrep。找到后cut再次筛选出我们需要显示的用户默认的shell。2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();答:3、使用ech..
分类:编程语言   时间:2016-09-04 00:18:51    阅读次数:351
第五周作业
第五周作业1、显示当前系统上root、fedora或user1用户的默认shell;[root@STCO6~]#grep-E‘^(root|fedora|user1)\>‘/etc/passwd|cut-d:-f1,7 root:/bin/bash fedora:/bin/bash user1:/bin/bash2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hel..
分类:其他好文   时间:2016-09-03 07:31:17    阅读次数:158
马哥Linux第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;PS:第一眼看到问题可能会有点头疼,那就把问题拆分完成,组合多个简单命令完成复杂工作 第一步,查找到这些用户并显示:使用|或衔接多个过滤条件: [root@CentOS7~]#grep-E"^root\>|^fedora\>|^user1\>"/etc/..
分类:系统相关   时间:2016-09-02 23:37:06    阅读次数:415
马哥2016全新Linux+Python高端运维班第五周作业
本周作业内容:1、显示当前系统上root、fedora或user1用户的默认shell;#没有fedora、user1用户,添加fadora,user1模拟环境 [root@localhost~]#useradd-s/sbin/nologinfedora&&useradd-s/bin/shuser1 #添加fadora、user1用户,并指定不同的默认shell [root@localhost~]#..
分类:编程语言   时间:2016-09-02 16:09:07    阅读次数:228
第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;#grep"^\(root\|fedora\|user1\)"/etc/passwd2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();#grep"[[:alpha:]].*()"/etc/rc.d/init.d/functions3、使用echo命令输出一个绝对路径,..
分类:其他好文   时间:2016-09-01 00:19:35    阅读次数:171
第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;grep-E‘^root|fedora|allan:‘/etc/passwd|cut-d:-f1,7#显示root,allan默认shellroot:/bin/bashallan:/bin/bash2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();egrep‘[_[:alpha:]]+..
分类:其他好文   时间:2016-08-30 23:09:59    阅读次数:364
第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;]#egrep"^root\b|^user1\b|^fedora\b"/etc/passwd|cut-d:-f1,72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();]#grep"[[:alpha:]]\+()"/etc/rc.d/init.d/functions3、使用echo命令..
分类:其他好文   时间:2016-08-30 22:53:12    阅读次数:266
Linux第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;egrep"^(root|user1|fedora)"/etc/passwd|cut-d:-f72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();egrep"^[[:alpha:]]+\(\)"/etc/rc.d/init.d/functions#小括号必须转义,因为()..
分类:系统相关   时间:2016-08-30 14:55:35    阅读次数:406
112条   上一页 1 ... 4 5 6 7 8 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!