[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] tar weirdness
- Subject: [ale] tar weirdness
- From: mhirsch at nubridges.com (Michael D. Hirsch)
- Date: Fri, 24 Jan 2003 10:51:47 -0500
On Friday 24 January 2003 09:58 am, James P. Kinney III wrote:
> Tar is not working the way I think it is suppose to. I want to tarball a
> directory EXCEPT for files ending in .gdbm
>
> tar cvzf tarball.tar.gz --exclude dir/*.gdbm dir
>
> All it tars ARE the gdbm files. Does tar not support globing?
The man page and the info page on tar disagree on the usage of this flag.
The man page says:
--exclude FILE
exclude file FILE
But the info page says:
`--exclude=PATTERN'
Causes `tar' to ignore files that match the PATTERN.
In general, the GNU info pages are more correct. The info page claim that
globbing is supported, but they seem to imply that quoting of the * is a
good idea.
The `--exclude=PATTERN' option prevents any file or member whose name
matches the shell wildcard (PATTERN) from being operated on. For
example, to create an archive with all the contents of the directory
`src' except for files whose names end in `.o', use the command `tar
-cf src.tar --exclude='*.o' src'.
--Michael
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale