Using GNU tar 1.26 on Linux, I'm looking for a way to stop processing after the N-th occurrence of a file in a .tar archive. This should work:tar --file=archive.tar --list --occurrence=1 filenameBut it doesn't work, for some reason. Besides: I know that =1 is the default value here, but defined it here for a proper demonstration of what I'm trying to achive. What I've tried so far:filename = exact filename: Works perfectly, but then, why should Iuse this option when I can also define that just this file should beprocessedfilname = something with wildcards, e.g. *.pdf processes all *.pdf files and seemingly ignores the --occurrence= option. I suspect that the wildcard deactivates --occurrence=Not using wildcards results in an file can't be found type of errorCorrect me if I'm wrong, but as far as I know there can't be more than on file with the exactly same name in a directory. My guess: This might work in combination with --no-ignore-case, but then… not?Question: What would be the correct way to a) use the --occurrence= option – or b) process the, say, 2nd occurrence of a file?
tar --occurrence= option ignored?
linux;tar