Re: tar exclude command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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/named 

You 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

Attachment: pgpCa9L5OHN89.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux