I am trying to list the contents of a tar file. I see that by combining -t and -f I can do so. It seems to work even for compressed archives.
The combination of -z in addition with -tf also seems to give the same result. Does this mean that -z in this context has no effect or the effect is there but not observable.
I am a noob. So pardon mistakes if any in my question.
21 Answer
You are correct that -tf and -tzf are the same for your file.
Modern versions of tar can automatically guess the type of compression of a compressed file. So, if it's a gzip file, it does not matter whether you specify the -z part or not.
For the same reason, you don't have to specify the j part in -tjf if it's a bzip2 compressed file.