I need to search for a file inside a tar.gz file without extracting it. After that, I need to copy the file that was searched (if ever there is) to another folder.So far I have this, but the copy part of this line gives me an error.gunzip -c file.tar.gz | tar tvf - | grep filename | -exec cp {} /folder/another_folder \;Or is there a better way to search for a file inside a tar.gz file without extracting it?
Search for a file inside a tar.gz file without extracting it and copy the result to another folder
tar