[kwlug-disc] tar question regarding leading "/"

Ronald Barnes ron at ronaldbarnes.ca
Tue Oct 3 15:36:58 EDT 2023


Ronald Barnes wrote on 2023-10-03 12:08:

Answering my own question:

The wildcard expansion happens *before* tar switches to the root folder, 
even in a cron job (where SHELL=/bin/bash is set).

Solution - a subshell where one changes to root directory before tar starts:

(cd /; tar ... lib/systemd/system/mailman*)







More information about the kwlug-disc mailing list