备份配置文件脚本
我要备份的文件列表在文件filelist中
cat filelist
----------------------------------------------
/usr/src/linux/.config
/etc/make.conf
/etc/portage/package.keywords
/etc/portage/package.use
/etc/portage/package.mask
/etc/portage/profile/package.use.mask
----------------------------------------------
/usr/src/linux/.config
/etc/make.conf
/etc/portage/package.keywords
/etc/portage/package.use
/etc/portage/package.mask
/etc/portage/profile/package.use.mask
执行下面的命令就可以备份在filelist中的文件了
tar zcvf `date +%F`-config.tar.gz `cat filelist`