Hi I have problem in tar command Can you help? tar -cv --exclude /var/named/chroot/proc/* -zf backup.tar.gz /var/named /var/named/chroot/proc/net/route /var/named/chroot/proc/net/udp /var/named/chroot/proc/net/tcp tar: Error exit delayed from previous errors Thank you Send instant messages to your online friends http://uk.messenger.yahoo.com
Try tar --exclude=/var/named/chroot/proc/* -zcvf backup.tar.gz /var/named On Thu, Jan 7, 2010 at 11:06 PM, adrian kok <adriankok2000 at yahoo.com.hk>wrote:> Hi > > I have problem in tar command > > Can you help? > > tar -cv --exclude /var/named/chroot/proc/* -zf backup.tar.gz /var/named > > /var/named/chroot/proc/net/route > /var/named/chroot/proc/net/udp > /var/named/chroot/proc/net/tcp > tar: Error exit delayed from previous errors > > Thank you > > Send instant messages to your online friends http://uk.messenger.yahoo.com > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100107/415d8824/attachment-0002.html>
On Thu, Jan 07, 2010 at 07:06:11AM -0800, adrian kok wrote:> Hi > > I have problem in tar command > > Can you help? > > tar -cv --exclude /var/named/chroot/proc/* -zf backup.tar.gz /var/namedYou must escape the *, so that shell doesn't convert the command to: tar -cv --exclude /var/named/chroot/proc/1 /var/named/chroot/proc/2 ... Use: tar -cv --exclude /var/named/chroot/proc/\* -zf backup.tar.gz /var/named Or just --exclude proc? -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20100107/9bf7a02f/attachment-0002.sig>
At Thu, 7 Jan 2010 07:06:11 -0800 (PST) CentOS mailing list <centos at centos.org> wrote:> > Hi > > I have problem in tar command > > Can you help? > > tar -cv --exclude /var/named/chroot/proc/* -zf backup.tar.gz /var/named > > /var/named/chroot/proc/net/route > /var/named/chroot/proc/net/udp > /var/named/chroot/proc/net/tcp > tar: Error exit delayed from previous errors"It is almost *always* wrong to pass an unquoted wildcard to tar." Try this: tar -cv --exclude '/var/named/chroot/proc/*' -zf backup.tar.gz /var/named Although I suspect that: tar -cv --exclude /var/named/chroot/proc -zf backup.tar.gz /var/named will also work.> > Thank you > > Send instant messages to your online friends http://uk.messenger.yahoo.com > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >-- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/