You can use tar -tvf
to show the contents of a tar file.
tar -tvf filename.tgz
You can extract a portion of the archive with
tar -zxvf filename.tgz path/inside/file -C destination/path
For instance, if I have a tar backup of my /home directory, and I need to extract a file out of the tarred Downloads to my current Downloads directory, I can do
tar -zxvf home.tgz home/incredigeek/Downloads/slack.deb ~/Downloads
https://www.cyberciti.biz/faq/list-the-contents-of-a-tar-or-targz-file/
https://stackoverflow.com/questions/24057301/bash-extract-only-part-of-tar-gz-archive