[kwlug-disc] tar --directory help please
Ronald Barnes
ron at ronaldbarnes.ca
Wed Jun 4 13:59:57 EDT 2025
Anton Avramov wrote on 2025-06-04 10:43:
> to pass the wildcard to tar us single quotes like so:
> 'etc/systemd/system/mailm*'
>
> Give it a go let us know
# tar -vvvcf ffs.tar --directory=/ 'etc/systemd/system/mailman*'
tar: etc/systemd/system/mailman*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Single or double quotes are giving me the same results.
There's gotta be a way to do this without using `cd /` first!
I've even tried "escaping" the wildcard:
# tar -vvvcf ffs.tar --directory=/ 'etc/systemd/system/mailman\*'
tar: etc/systemd/system/mailman\\*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
(Thanks for the suggestion Anton!)
More information about the kwlug-disc
mailing list