[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: some new user questions



On Mon, Oct 28, 2024 at 10:16:51AM -0700, Colin Percival wrote:
> On 10/28/24 09:09, void wrote:
> > In tcsh, I'm testing some systems with --dry-run and --exclude like this:
> > 
> > % tarsnap --dry-run --no-default-config --exclude "*.{iso,img,tar,zst}"
> > -- print-stats --humanize-numbers -v -c /home/void
> 
> Globbing is particularly full of pitfalls.  Does it work if you specify
>     --exclude '*.iso' --exclude '*.img' --exclude '*.tar' --exclude '*.zst'
> separately?

To confirm,

    tarsnap -v -c --dry-run --exclude "*.{txt,pdf}" .

does not work as one might expect.  Instead, you need multiple options:

    tarsnap -v -c --dry-run --exclude "*.txt" --exclude "*.pdf" .

I'll add a note to
https://www.tarsnap.com/selecting-files.html

Cheers,
- Graham