linux简单的文件备份脚本
2017-02-28 本文已影响0人
水坑蛋
以/etc/hosts文件为例吧,备份至/tmp目录下time=`date +%y%m%d`
dd if=/etc/hosts of=/tmp/host"$time".bak
ps:可以用crontab 命令让脚本定期执行
以/etc/hosts文件为例吧,备份至/tmp目录下time=`date +%y%m%d`
dd if=/etc/hosts of=/tmp/host"$time".bak
ps:可以用crontab 命令让脚本定期执行