马哥教育网络班22期第五周课程练习1

1、cat /etc/passwd  | egrep "^root|^fedora|^user1"| cut -d":" -f1,7 

2、egrep -o  "[^[:space:]]+\(\)" /etc/rc.d/init.d/functions  

3、echo "/etc/rc.d/init.d/functions" | egrep  -o '[^/]+/?$' | egrep -o '[^/]+'

4、echo /etc/rc.d/ | egrep  -o '[^/]+/?$' | egrep -o '[^/]+'

5、ifconfig | egrep -o "[1-9][0-9]?|1[0-9]{2}|2[0-4][0-9]|25[0-5]"

ifconfig | egrep -o "(\<([0,1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\>\.){3}\<([0,1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\>"

6、egrep "[[:alnum:]]+_?[[:alnum:]]+@[[:alnum:]]+\.[[:alpha:]]+\.?[[:alpha:]]+?"

7、find /var -user root -a -group mail -exec ls -ld {} \; 

8、find / -nogroup  -o -nouser 

find / \( -nouser -o -nogroup \) -atime -3

9、find /etc -type f -perm -222

10、find /etc -size +1M -type f 

11、find /etc/init.d/ -perm -113

12、find /usr -not \( -user root -o -user bin -o -user hadoop \) -type f 

13、find /etc -not -perm /222 

14、find /etc/ -mtime -7 -not \( -user root -o -user hadoop \) -type f 

原创文章,作者:未闻花名,如若转载,请注明出处:http://www.178linux.com/45676

(0)
未闻花名未闻花名
上一篇 2016-09-15 22:21
下一篇 2016-09-15 22:21

相关推荐

  • 进程管理之工作管理详解(job control)

    进程管理之工作管理详解(job control) 1 什么是工作管理(job control)   我们知道linux是多任务多终端工作的操作系统。我们可以在多个终端进行工作,也可以在一个终端进行多个任务工作。那在一个终端同时进行多个工作任务,就称为工作管理。比如这种情况,在一个终端,你想要复制文件,同时你还想压缩打包文件,甚至你还想编辑文件,这个…

    Linux干货 2017-05-14
  • YUM LNMP 安装 wordpress

    1配置防火墙 Iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT #允许80端口通过防火墙 iptables-A&…

    Linux干货 2016-06-22
  • wordpress和discuz的负载均衡(lvs-dr)

    wordpress和discuz的负载均衡 实验目的:利用lvs-dr模型实现wordpress和discuz的负载均衡 实验要求:客户端访问wordpress或discuz服务器时,无论被调度至哪台RS上,其会话和访问的页面都应保持一致; 实验环境:一台server用作VS,两台server用作RS,一台server用于部署mysql、NFS、wordpr…

    2017-05-13
  • tar,cpio,rpm,yum的使用详解(适合初学者)

    基于linux下的tar包管理和yum源配置 友情提示:对于这些实际操作的,还是需要进行手工的尝试,由于这几个对于包管理的是比较常用和实用的, 所以,一定要熟练使用。 1.tar tar是对于系统中文件,目录等进行打包,解包的工具。tar也可以对文件进行打包存放到别的目录下, 所以在很早的时候,一些老的工程师经常使用tar对文件进行备份。很大程度上,所谓的t…

    Linux干货 2016-08-21
  • N26 第六周作业

    总结vim编辑器的使用 Vim 模式    Vim 有六种基本模式    Normal mode                 Visual mode&nbs…

    Linux干货 2017-02-01

评论列表(1条)

  • 马哥教育
    马哥教育 2016-09-19 18:23

    下次最好能把题目也写上