Q1:显示/test目录下的所有目录
Q2:将文件/home/yyc/test下中除了1.txt文件以外的所有文件打包压缩到/home/yyc/test下,名字为b.gz
R:--exclude位置,选项P是忽略/错误
Q3:计划每星期天早8点服务器定时发送一封内容为:test的邮件。发信人:user1@ab.com 收 信人:test1@example.com,如何实现?
A:crontab -e
0 8 * * 7 echo "test" I /bin/mail -r user1@ab.com -s test test1@example.com &>/dev/null
Q4:将当前目录下大于100k的文件移动到/tmp路径下
A:find ./ -type f -size +100k -exec mv {} /tmp \;