码迷,mamicode.com
首页 >  
搜索关键字:etc/passwd    ( 1656个结果
马哥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
第五周作业
1、显示当前系统上root、fedora或user1用户的默认shell;#useraddfedora#useradduser1#grep-E"^(root|fedora|user1)\>"/etc/passwd|cut-d:-f1,7(注意是使用扩展正则表达式)^:行首|:或者():将一个或多个字符捆绑在一起,当作一个整体进行处理cut-d分隔符-fN,M:指定分隔..
分类:其他好文   时间:2016-09-04 17:48:12    阅读次数:193
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
homework week05
本周作业内容:1、显示当前系统上root、fedora或user1用户的默认shell;[root@captain~]#grep-wE‘^(root|fedora|user1)‘/etc/passwd|>awk-F‘[:]‘‘BEGIN{printf("username\tshell\n")}>{printf("%-15s\t%s\n",$1,$NF)}‘ usernameshell root/bin/bash2、找出/etc/rc.d/..
分类:其他好文   时间:2016-09-04 00:17:17    阅读次数:173
第五周作业
第五周作业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
马哥运维学习作业(五)
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
linux 查找文件的命令
1、which[root@lb01~]#whichpasswd /usr/bin/passwd #which-showsthefullpathof(shell)commands. #显示命令的全路径2、whereis[root@lb01~]#whereispasswd passwd:/usr/bin/passwd/etc/passwd/usr/share/man/man5/passwd.5.gz/usr/share/man/man1/passwd.1.gz #whereis-locatet..
分类:系统相关   时间:2016-08-31 12:22:56    阅读次数:187
第五次作业
1、显示当前系统上root、fedora或user1用户的默认shell;grep-E"^(root|fedora|user1)\>"/etc/passwd|cut-d:-f1,72、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hello();grep-E"[[:alpha:]]+\(\)+"/etc/rc.d/init.d/functions3、使用echo命令..
分类:其他好文   时间:2016-08-31 12:21:01    阅读次数:136
第五周作业
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!