--compression & --exclude option

13 views
Skip to first unread message

Marco

unread,
Aug 12, 2007, 8:58:16 AM8/12/07
to xar-devel
I've tried this command:

xar --compression gzip -cf test.xar.gz test/

but when i try to uncompress it with "gzip" command, it returns:

gzip: test.xar.gz: not in gzip format

The same happens with bzip2 format.

Also, i want to exclude all files that begin with dot, so i've tried:

xar -cf test.xar.gz test/ --exclude "*/.*"

but it doesn't work, but if i try:

xar -cf test.xar.gz test/ --exclude */.*

it excludes all files!!

Could anyone help me?

Thank
Marco

Rob Braun

unread,
Aug 12, 2007, 12:08:52 PM8/12/07
to xar-...@googlegroups.com
On Sun, Aug 12, 2007 at 05:58:16AM -0700, Marco wrote:
>
> I've tried this command:
>
> xar --compression gzip -cf test.xar.gz test/
>
> but when i try to uncompress it with "gzip" command, it returns:
>
> gzip: test.xar.gz: not in gzip format
>
> The same happens with bzip2 format.

xar is not like tar. Using a compression method here is not the
same as xar -cf - test/ | gzip -c - > test.xar.gz. For more
information on the xar file format, please see the wiki:
http://code.google.com/p/xar/wiki/xarformat

> Also, i want to exclude all files that begin with dot, so i've tried:
>
> xar -cf test.xar.gz test/ --exclude "*/.*"

xar uses posix regexes, and this is not a proper posix regex for
what you want to do:
xar --exclude=".*/\..*" -cf test.xar test/

> but it doesn't work, but if i try:
>
> xar -cf test.xar.gz test/ --exclude */.*

This is using shell globbing and is not passing the expression
to xar. Your shell's documentation should have more information
on globbing and quoting.

Rob

Reply all
Reply to author
Forward
0 new messages