1PTARGREP(1) User Contributed Perl Documentation PTARGREP(1)
2
3
4
6 ptargrep - Apply pattern matching to the contents of files in a tar
7 archive
8
10 ptargrep [options] <pattern> <tar file> ...
11
12 Options:
13
14 --basename|-b ignore directory paths from archive
15 --ignore-case|-i do case-insensitive pattern matching
16 --list-only|-l list matching filenames rather than extracting matches
17 --verbose|-v write debugging message to STDERR
18 --help|-? detailed help message
19
21 This utility allows you to apply pattern matching to the contents of
22 files contained in a tar archive. You might use this to identify all
23 files in an archive which contain lines matching the specified pattern
24 and either print out the pathnames or extract the files.
25
26 The pattern will be used as a Perl regular expression (as opposed to a
27 simple grep regex).
28
29 Multiple tar archive filenames can be specified - they will each be
30 processed in turn.
31
33 --basename (alias -b)
34 When matching files are extracted, ignore the directory path from
35 the archive and write to the current directory using the basename
36 of the file from the archive. Beware: if two matching files in the
37 archive have the same basename, the second file extracted will
38 overwrite the first.
39
40 --ignore-case (alias -i)
41 Make pattern matching case-insensitive.
42
43 --list-only (alias -l)
44 Print the pathname of each matching file from the archive to
45 STDOUT. Without this option, the default behaviour is to extract
46 each matching file.
47
48 --verbose (alias -v)
49 Log debugging info to STDERR.
50
51 --help (alias -?)
52 Display this documentation.
53
55 Copyright 2010 Grant McLean <grantm@cpan.org>
56
57 This program is free software; you can redistribute it and/or modify it
58 under the same terms as Perl itself.
59
60
61
62perl v5.34.0 2022-01-20 PTARGREP(1)