Searching inside a tarball file (even gzipped) can be really relieving. You don’t have to extract all the files every time to seek for a file using find
command.
Search tarball files using grep
1 |
tar -tvf my-data.tar.gz | grep search-pattern |
Search tarball files using its built-in parameter
Note: that if you want to use wildcards you need to add --wildcards
parameter
1 |
tar -tvf my-data.tar.gz 'search-pattern' |