1、在/var/log目录下创建一个hehe.log的文件,其文件内容是:
myhostname = ghl
mydomain = localdomain
relayhost = [smtp.qq.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
2、把hehe.log文件复制到/tmp目录下,并改名为haha.log
3、在/tmp目录下创建dirdir目录,把ls log 的输出保存到dirdir目录下的1.cfg文件中。并改名为new.cfg
4、在/var/log目录下查找.log后缀名的文件,并把输出保存到/tmp/log.txt文件中
5、用zip命令和tar命令将1-4题的new.cfg。log.txt。haha.log文件,压缩到/tmp目录
6、在/tmp目录下创建haha目录和xixi目录,将5题tar命令压缩的文件解压到haha目录。zip命令压缩的文件解压到xixi目录