[kwlug-disc] tar --directory help please

Steve Izma sizma at golden.net
Wed Jun 4 15:27:34 EDT 2025


On Wed, Jun 04, 2025 at 10:33:42AM -0700, Ronald Barnes via kwlug-disc wrote:
> Subject: [kwlug-disc] tar --directory help please
> 
> There are 2 files I want to include:
> 
> # ll /etc/systemd/system/mailman*
> -rw-r--r-- 1 mailman root  461 2025-05-31 07:00
> /etc/systemd/system/mailman3.service
> -rw-r--r-- 1 mailman root 1226 2025-06-04 06:35
> /etc/systemd/system/mailman3-web.service
> 
> 
> However... errors with or without quotes around the path to archive:
> 
> # tar -vcf ffs.tar --directory=/ etc/systemd/system/mailm*
> tar: etc/systemd/system/mailm*: Cannot stat: No such file or directory
> tar: Exiting with failure status due to previous errors

Don't you need the --wildcards option for tar to interpret the
"*" properly?

-- 
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