ptargrep
Apply pattern matching to the contents of files in a tar archive
TLDR
SYNOPSIS
ptargrep [options] pattern tar-file ...
DESCRIPTION
ptargrep allows you to apply pattern matching to the contents of files in a tar archive. The pattern is used as a Perl regular expression.The default behavior is to extract each matching file from the archive. Use --list-only to only print pathnames of matching files instead.Compressed archives (gzip, bzip2, xz) are handled automatically based on the file extension.Multiple tar archive filenames can be specified and they will each be processed in turn.
PARAMETERS
-b, --basename
When extracting matching files, ignore the directory path from the archive and write to the current directory using only the basename. Files with identical names will overwrite each other.-i, --ignore-case
Case-insensitive pattern matching.-l, --list-only
Print the pathname of each matching file to stdout instead of extracting.-v, --verbose
Log debugging info to stderr.-?, --help
Display help documentation.
CAVEATS
Part of the Perl distribution (Archive::Tar module). Large archives may be slow to process. Memory usage can be high with large files since file contents are read into memory.
HISTORY
ptargrep is distributed with Perl's Archive::Tar module. It provides grep-like functionality for archived content.
