115 lines
2.9 KiB
HTML
115 lines
2.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PTARGREP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PTARGREP</H1>
|
|
Section: Perl Programmers Reference Guide (1)<BR>Updated: 2020-10-19<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ptargrep - Apply pattern matching to the contents of files in a tar archive
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
ptargrep [options] <pattern> <tar file> ...
|
|
|
|
Options:
|
|
|
|
--basename|-b ignore directory paths from archive
|
|
--ignore-case|-i do case-insensitive pattern matching
|
|
--list-only|-l list matching filenames rather than extracting matches
|
|
--verbose|-v write debugging message to STDERR
|
|
--help|-? detailed help message
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This utility allows you to apply pattern matching to <B>the contents</B> of files
|
|
contained in a tar archive. You might use this to identify all files in an
|
|
archive which contain lines matching the specified pattern and either print out
|
|
the pathnames or extract the files.
|
|
<P>
|
|
|
|
The pattern will be used as a Perl regular expression (as opposed to a simple
|
|
grep regex).
|
|
<P>
|
|
|
|
Multiple tar archive filenames can be specified - they will each be processed
|
|
in turn.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--basename</B> (alias -b)<DD>
|
|
|
|
|
|
When matching files are extracted, ignore the directory path from the archive
|
|
and write to the current directory using the basename of the file from the
|
|
archive. Beware: if two matching files in the archive have the same basename,
|
|
the second file extracted will overwrite the first.
|
|
<DT id="2"><B>--ignore-case</B> (alias -i)<DD>
|
|
|
|
|
|
Make pattern matching case-insensitive.
|
|
<DT id="3"><B>--list-only</B> (alias -l)<DD>
|
|
|
|
|
|
Print the pathname of each matching file from the archive to <FONT SIZE="-1">STDOUT.</FONT> Without
|
|
this option, the default behaviour is to extract each matching file.
|
|
<DT id="4"><B>--verbose</B> (alias -v)<DD>
|
|
|
|
|
|
Log debugging info to <FONT SIZE="-1">STDERR.</FONT>
|
|
<DT id="5"><B>--help</B> (alias -?)<DD>
|
|
|
|
|
|
Display this documentation.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright 2010 Grant McLean <<A HREF="mailto:grantm@cpan.org">grantm@cpan.org</A>>
|
|
<P>
|
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
under the same terms as Perl itself.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:25 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|