码迷,mamicode.com
首页 >  
搜索关键字:egrep    ( 928个结果
马哥2016全新Linux+Python高端运维班-Linux grep正则表达式练习,及find命令
本周作业内容:1、显示当前系统上root、fedora或user1用户的默认shell;[root@liuhome]#grep-E"^(root|fedora|user1)\>"/etc/passwd|cut-d:-f1,7 root:/bin/bash user1:/bin/bash fedora:/bin/bash #本题使用扩展的正则表达式 #^:首行|:或者():将一个或者多个字符捆绑在一起..
分类:编程语言   时间:2016-09-05 17:29:22    阅读次数:291
第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;egrep"^root|^fedora|^user1"/etc/passwd|cut-d:-f1,72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();grep"\<[[:alpha:]]\+\>()"/etc/rc.d/init.d/functions3、使用echo命令..
分类:其他好文   时间:2016-09-05 17:27:26    阅读次数:127
megeedu Linux+Python高级运维班 3期 第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;[root@bogon~]#useraddfedora#添加用户fedora [root@bogon~]#useradduser1#添加用户user1 [root@bogon~]#egrep‘^(root|fedora|user1)‘/etc/passwd|cut-d:-f1,7 #使用表达式(root|fedora|user1)查找root、fedora或user1 r..
分类:编程语言   时间:2016-09-05 17:25:03    阅读次数:259
数据库备份mysqldump应用总结
[root@ansible~]#mysqldump-uroot-p123456xxx>/opt/xxx.sql#备份数据库xxx [root@ansible~]#egrep-v"#|\*|--|^$"/opt/xxx.sql DROPTABLEIFEXISTS`test`; CREATETABLE`test`( `id`int(4)NOTNULLAUTO_INCREMENT, `name`char(20)NOTNULL, PRIMARYKEY(`id`) )ENGINE=InnoDBAUTO_..
分类:数据库   时间:2016-09-05 09:17:47    阅读次数:288
马哥Linux网络班作业(5)
1、显示当前系统上root、fedora或user1用户的默认shell;答:[root@mageeduCT7~]#egrep‘^(root|user1)\>‘/etc/passwd|cut-d:-f7 /bin/bash /bin/bash2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();答:[root@mageeduCT7~]#grep‘\<[[..
分类:系统相关   时间:2016-09-04 17:51:27    阅读次数:286
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@C7-1~]#useraddfedora#新建用户fedora [root@C7-1~]#useradduser1#新建用户user1 [root@C7-1~]#egrep‘^(root|fedora|user1)\>‘/etc/passwd|cut-d:-f1,7#由于(root|fedora|user1)是扩展表达式,所以要使用egrep..
分类:其他好文   时间:2016-09-02 16:07:52    阅读次数:173
第五周作业
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
928条   上一页 1 ... 50 51 52 53 54 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!