[kwlug-disc] tar --directory help please

Steve Izma sizma at golden.net
Wed Jun 4 16:51:06 EDT 2025


On Wed, Jun 04, 2025 at 08:01:01PM +0000, Doug Moen wrote:
> Subject: Re: [kwlug-disc] tar --directory help please
> 
> Steve wrote
> > Don't you need the --wildcards option for tar to interpret the "*" properly?
> 
> In GNU tar, the --wildcards option only affects include and
> exclude patterns (which aren't being used in any of these
> examples). It doesn't affect filename arguments, at least
> according to the man page.

Right. I was mixed up between create and extract.

Without --wildcards on extraction, I get an error message unless
the shell expansion of the file arguments happens to match at
least one node in the current directory. Otherwise the shell
doesn't expand the pattern at all and tar actually sees the "*",
in which case tar complains about the lack of --wildcards. This
doesn't cause a problem in create mode, though.

	-- Steve

-- 
Steve Izma
-
Home: 35 Locust St., Kitchener, Ontario, Canada  N2H 1W6
E-mail: sizma at golden.net  phone: 519-745-1313
cell (text only; not frequently checked): 519-998-2684

==
The most erroneous stories are those we think we know best – and
therefore never scrutinize or question.
    -- Stephen Jay Gould, *Full House: The Spread of Excellence
    from Plato to Darwin*, 1996


More information about the kwlug-disc mailing list