马哥教育网络班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

相关推荐

  • RAID配置管理

    RAID:Redundant Arrays Indexpensive Disks     多个磁盘组合成一个阵列,来提供更好的性能、冗余     提高IO功能:         磁盘并行读写 &nbs…

    Linux干货 2016-09-01
  • 磁盘阵列(RAID)简介

    资料 RAID(Redundant Arrays of Inexpensive Disks 廉价磁盘冗余阵列)即磁盘阵列,磁盘阵列是由多个价格比较便宜的磁盘组合成的一个容量巨大的磁盘组,其原理是利用数组方式来制作磁盘组,配合数据分散排列的设计,配合数据分散排列的设计,提升数据的安全性。它把数据分别存放在多个硬盘上,输入输出操作能以平衡的方式交叠,改良性能,因…

    Linux干货 2017-04-17
  • 压缩和归档——释放你的磁盘空间

    压缩和解压缩工具 压缩比:文件压缩比就是指文件经过压缩后的文件大小与源文件大小的一个比差,经过压缩工具包可以把文件压缩 压缩的目的:      时间换空间      CPU时间换硬盘的空间 压缩工具: compress/uncompress 以.Z作为文件后缀 gzip/gunz…

    Linux干货 2016-08-18
  • PXE

    BootStraping 系统提供 PXE 简介 PXE(preboot execute environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file…

    Linux干货 2016-11-05
  • 20160802课堂练习题

    练习: 1、  当用户xiaoming对/testdir 目录无执行权限时,意味着无法做哪些操作? 无法cd进入该目录,但可以ls查看到该目录下的文件,其余的任何操作都执行不了。 2、  当用户xiaoqiang对/testdir 目录无读权限时,意味着无法做哪些操作? 能够进入该目录,不能读取到信息;但如果知道有哪些文件及目录是可以创建…

    Linux干货 2016-08-04
  • 很认真的第十三周作业哦

    1、建立samba共享,共享目录为/data,要求:(描述完整的过程) mkdir /data #建立共享目录 1)共享名为shared,工作组为magedu vim /etc/samba/smb.conf 修改 workgroup = MYGROUP 为 workgroup = magedu 修改 passdb backend = tdbsam 为 pas…

    Linux干货 2017-03-27

评论列表(1条)

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

    下次最好能把题目也写上