Я использую эту команду для резервного копирования некоторых важных файлов конфигурации:
tar -czvf /var/backups/201102121202.tgz -C / etc/crontab etc/httpd/conf.d/* etc/httpd/conf/httpd.conf etc/httpd/passwords etc/httpd/vhost/* etc/php.ini etc/my.cnf etc/ssh/* etc/hosts etc/sysconfig/iptables var/spool/cron/* etc/passwd etc/group root/iptables_config etc/postfix/main.cf etc/postfix/master.cf etc/postfix/transport etc/postfix/valid_recipients etc/postfix/virtual etc/sysconfig/memcached etc/php.d/apc.ini etc/selinux/config etc/yum.repos.d/* etc/list_of_installed_packages.txt etc/safe-rm.conf home/*/.bash* home/*/.ssh usr/local/bin/* usr/local/sbin/* /etc/pki/tls/certs/mysite.com.crt /etc/pki/tls/private/mysite.key /etc/pki/tls/certs/gd_bundle.crt
Когда я запускаю его, я получаю:
tar: etc/httpd/conf.d/*: Cannot stat: No such file or directory
tar: etc/httpd/vhost/*: Cannot stat: No such file or directory
tar: etc/ssh/*: Cannot stat: No such file or directory
tar: var/spool/cron/*: Cannot stat: No such file or directory
tar: etc/yum.repos.d/*: Cannot stat: No such file or directory
tar: home/*/.bash*: Cannot stat: No such file or directory
tar: home/*/.ssh: Cannot stat: No such file or directory
tar: usr/local/bin/*: Cannot stat: No such file or directory
tar: usr/local/sbin/*: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
tar: Error exit delayed from previous errors
Кажется, я не могу использовать подстановочные знаки в путях.
Как я могу это исправить или обойти это?
Спасибо,
Дэн