请按照日期格式(xxxx-xx-xx)每日生成一个文件,例现在天生成的文件为2017-09-03.log, 而且把磁盘的使用状况写到到这个文件中。shell
## vim log.shvim
## vim log.sh
#!/bin/bash d=`date +%F` touch $d.log df -hT > $d.log
crontab -e
00 * * * /bin/sh /root/shell/log.shbash
00 * * * /bin/sh /root/shell/log.sh