On Wed, May 05, 2021 at 04:03:03PM +0200, tastytea wrote > > This works fine here with ???tar (GNU tar) 1.34???: > > $ mkdir -p a/b > $ touch a/file a/b/file > $ touch a/file.xz a/b/file.xz > $ tree a > a > ????????? b > ??? ????????? file > ??? ????????? file.xz > ????????? file > ????????? file.xz > > 1 directory, 4 files > $ tar -cvzf test.tar.gz --exclude="a/file" --exclude="a/b/*.xz" a
That's files. What happens with directories, e.g. tar -cvzf test.tar.gz --exclude="a/b/" a I know I followed the manual. Actually, my problem seems to be with directories. See https://serverfault.com/questions/742514/running-the-tar-command-with-the-exclude-functionality-does-not-work-for-direc where someone finds that... tar hczf t.tar.gz * --exclude="./test1" ...doesn't work, but... tar --exclude="./test1" -hczf t.tar.gz * ...does work!?!?!? -- Walter Dnes <waltd...@waltdnes.org> I don't run "desktop environments"; I run useful applications