先把需要备份的文件放到一个文本中。
vi configlist
/etc/passwd
/etc/inetd.conf
/etc/hosts/allow
/etc/hosts.deny
然后用 tar 压缩:
tar cvfzT /tmp/backup.tar.gz configlist
tar: Removing leading `/` from absolute path names in the archive
etc/passwd
etc/inetd.conf
(出处:http://www.sheup.com)