This is how to create a new archive -c from a specific location -f that is compressed with gzip -z and output -v every filename it has written to the archive.
$ tar -czvf stuff.tar.gz stuff/
This is how to extract -x from a archive that is compressed with gzip -z to a specific location -f and output -v every filename it has read from the archive.
$ tar -xzvf stuff.tar.gz
This is how to list -t the contents of a archive that is compressed with gzip -z from a specific location -f.
$ tar -tzf stuff.tar.gz
If you don’t want to see any output you just drop the -v and if you only will deal with tar archives not tar.gz drop the -z.