Hello,
I use Solaris 2.8 on a Sun UltraSparc Workstation. I have troubles with
the 'tar' archiving command.
The 'tar' command is given in my home directory as follows:
tar cvfX mecanero.tar exclude.txt -C /export/work/wim/samcef .
This command should archive the contents of the directory
/export/work/wim/samcef and its subdirectories into the 'tar'-file
"mecanero.tar" and the files listed in "exclude.txt" should be excluded.
When I put the file "tension.f" in the exclude.txt file, the file is
indeed excluded with the following message (from the verbose output):
a ./tension.f excluded
However when I put the line
./tension.*
in the exclude.txt file, the file tension.f is yet included. I have
tried all sorts of combinations
*tension*
tension.*
./tension.*
./tension*
but none of them works. It seems that 'tar' simply ignores the wildcard
character.
Can anybody help ?
Wim Van Paepegem
Wim.Van...@rug.ac.be
Sent via Deja.com
http://www.deja.com/
> when I put the line
>
> ./tension.*
>
> in the exclude.txt file, the file tension.f is yet included. I have
> tried all sorts of combinations
>
> *tension*
> tension.*
> ./tension.*
> ./tension*
>
> but none of them works. It seems that 'tar' simply ignores the wildcard
> character.
Correct. Wildcard characters such as * are expanded by the shell. Tar
is not a shell, and should not be expected to expand wildcard
characters. An exclude file containing
./tension.*
would exclude a single file called (exactly) "tension.*" in the current
directory, and nothing else.
--
Tony
This posting does not constitute official support from Sun Microsystems
Star does this:
star -c -V pat=tension.* .
would do this. You may have up to 100 patterns....
ftp://ftp.fokus.gmd.de/pub/unix/star/alpha/
--
EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
j...@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schi...@fokus.gmd.de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix