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@yahoo.com.hkwrote:
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@centos.org http://lists.centos.org/mailman/listinfo/centos
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?
At Thu, 7 Jan 2010 07:06:11 -0800 (PST) CentOS mailing list centos@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@centos.org http://lists.centos.org/mailman/listinfo/centos
Hello,
tar -cv --exclude '/var/named/chroot/proc/*' -zf backup.tar.gz /var/named
I think this is the best way to use wildcards in expressions to avoid problems. ;)
tar -cv --exclude /var/named/chroot/proc -zf backup.tar.gz /var/named
Yes, it works, but it didn't create the proc folder inside the tar folder tree. Example:
Original folder tree:
- var |- named |- chroot |- proc |- garbage1.txt |- garbage2.txt |- foo |- test1.txt |- test2.txt |- bar |- test3.txt |- test4.txt
# tar -cv --exclude '/var/named/chroot/proc/*' -zf backup.tar.gz /var/named
Will keep this structure at backup.tar.gz
- var |- named |- chroot |- proc |- foo |- test1.txt |- test2.txt |- bar |- test3.txt |- test4.txt
tar -cv --exclude /var/named/chroot/proc -zf backup.tar.gz /var/named
Will save this structure at backup.tar.gz
- var |- named |- chroot |- foo |- test1.txt |- test2.txt |- bar |- test3.txt |- test4.txt
[]s
On 01/07/2010 04:53 PM, "Fábio Jr." wrote: ...
Yes, it works, but it didn't create the proc folder inside the tar folder tree. Example:
Can't you use the --one-file-system option to prevent tar from descending into the proc folder?
Mogens