2024-02-12 15:09:10 +00:00
|
|
|
.\" SPDX-License-Identifier: 0BSD
|
2009-07-05 19:25:17 +00:00
|
|
|
.\"
|
2024-02-12 15:09:10 +00:00
|
|
|
.\" Authors: Lasse Collin
|
|
|
|
.\" Jia Tan
|
2009-07-05 19:25:17 +00:00
|
|
|
.\"
|
2024-02-12 15:09:10 +00:00
|
|
|
.\" (Note that this file is not based on gzip's zgrep.1.)
|
2009-07-05 19:25:17 +00:00
|
|
|
.\"
|
2024-02-12 15:09:10 +00:00
|
|
|
.TH XZGREP 1 "2024-02-12" "Tukaani" "XZ Utils"
|
2007-12-08 22:42:33 +00:00
|
|
|
.SH NAME
|
2024-02-12 15:09:10 +00:00
|
|
|
xzgrep \- search possibly-compressed files for patterns
|
|
|
|
.
|
2007-12-08 22:42:33 +00:00
|
|
|
.SH SYNOPSIS
|
2009-04-13 11:49:48 +00:00
|
|
|
.B xzgrep
|
2024-02-12 15:09:10 +00:00
|
|
|
.RI [ option... ]
|
|
|
|
.RI [ pattern_list ]
|
2020-04-06 16:31:50 +00:00
|
|
|
.RI [ file... ]
|
2007-12-08 22:42:33 +00:00
|
|
|
.br
|
2009-04-13 11:49:48 +00:00
|
|
|
.B xzegrep
|
2020-03-26 22:17:31 +00:00
|
|
|
\&...
|
2009-04-13 11:49:48 +00:00
|
|
|
.br
|
|
|
|
.B xzfgrep
|
2020-03-26 22:17:31 +00:00
|
|
|
\&...
|
2009-04-13 11:49:48 +00:00
|
|
|
.br
|
|
|
|
.B lzgrep
|
2020-03-26 22:17:31 +00:00
|
|
|
\&...
|
2009-04-13 11:49:48 +00:00
|
|
|
.br
|
2007-12-08 22:42:33 +00:00
|
|
|
.B lzegrep
|
2020-03-26 22:17:31 +00:00
|
|
|
\&...
|
2007-12-08 22:42:33 +00:00
|
|
|
.br
|
|
|
|
.B lzfgrep
|
2020-03-26 22:17:31 +00:00
|
|
|
\&...
|
2024-02-12 15:09:10 +00:00
|
|
|
.
|
2007-12-08 22:42:33 +00:00
|
|
|
.SH DESCRIPTION
|
2010-09-27 20:29:34 +00:00
|
|
|
.B xzgrep
|
2009-07-05 19:25:17 +00:00
|
|
|
invokes
|
2007-12-08 22:42:33 +00:00
|
|
|
.BR grep (1)
|
2024-02-12 15:09:10 +00:00
|
|
|
on uncompressed contents of files.
|
|
|
|
The formats of the
|
2009-07-05 19:25:17 +00:00
|
|
|
.I files
|
2024-02-12 15:09:10 +00:00
|
|
|
are determined from the filename suffixes.
|
|
|
|
Any
|
|
|
|
.I file
|
|
|
|
with a suffix supported by
|
2009-07-05 19:25:17 +00:00
|
|
|
.BR xz (1),
|
|
|
|
.BR gzip (1),
|
2011-03-19 11:08:22 +00:00
|
|
|
.BR bzip2 (1),
|
2020-09-25 01:35:18 +00:00
|
|
|
.BR lzop (1),
|
2009-07-05 19:25:17 +00:00
|
|
|
or
|
2024-02-12 15:09:10 +00:00
|
|
|
.BR zstd (1)
|
|
|
|
will be decompressed;
|
|
|
|
all other files are assumed to be uncompressed.
|
2009-07-05 19:25:17 +00:00
|
|
|
.PP
|
|
|
|
If no
|
2024-02-12 15:09:10 +00:00
|
|
|
.I files
|
|
|
|
are specified or
|
2009-07-05 19:25:17 +00:00
|
|
|
.I file
|
2024-02-12 15:09:10 +00:00
|
|
|
is
|
|
|
|
.B \-
|
|
|
|
then standard input is read.
|
|
|
|
When reading from standard input, only files supported by
|
|
|
|
.BR xz (1)
|
|
|
|
are decompressed.
|
|
|
|
Other files are assumed to be in uncompressed form already.
|
|
|
|
.PP
|
|
|
|
Most
|
|
|
|
.I options
|
|
|
|
of
|
|
|
|
.BR grep (1)
|
|
|
|
are supported.
|
|
|
|
However, the following options are not supported:
|
|
|
|
.IP "" 4
|
|
|
|
.BR \-r ,
|
|
|
|
.B \-\-recursive
|
|
|
|
.IP "" 4
|
|
|
|
.BR \-R ,
|
|
|
|
.B \-\-dereference\-recursive
|
|
|
|
.IP "" 4
|
|
|
|
.BR \-d ,
|
|
|
|
.BI \-\-directories= action
|
|
|
|
.IP "" 4
|
|
|
|
.BR \-Z ,
|
|
|
|
.B \-\-null
|
|
|
|
.IP "" 4
|
|
|
|
.BR \-z ,
|
|
|
|
.B \-\-null\-data
|
|
|
|
.IP "" 4
|
|
|
|
.BI \-\-include= glob
|
|
|
|
.IP "" 4
|
|
|
|
.BI \-\-exclude= glob
|
|
|
|
.IP "" 4
|
|
|
|
.BI \-\-exclude\-from= file
|
|
|
|
.IP "" 4
|
|
|
|
.BI \-\-exclude\-dir= glob
|
2007-12-08 22:42:33 +00:00
|
|
|
.PP
|
2009-04-13 11:49:48 +00:00
|
|
|
.B xzegrep
|
2024-02-12 15:09:10 +00:00
|
|
|
is an alias for
|
|
|
|
.BR "xzgrep \-E" .
|
2009-04-13 11:49:48 +00:00
|
|
|
.B xzfgrep
|
2024-02-12 15:09:10 +00:00
|
|
|
is an alias for
|
|
|
|
.BR "xzgrep \-F" .
|
|
|
|
.PP
|
|
|
|
The commands
|
2009-04-13 11:49:48 +00:00
|
|
|
.BR lzgrep ,
|
|
|
|
.BR lzegrep ,
|
|
|
|
and
|
2024-02-12 15:09:10 +00:00
|
|
|
.B lzfgrep
|
|
|
|
are provided for backward compatibility with LZMA Utils.
|
|
|
|
.
|
2022-07-19 20:19:49 +00:00
|
|
|
.SH EXIT STATUS
|
|
|
|
.TP
|
|
|
|
0
|
|
|
|
At least one match was found from at least one of the input files.
|
|
|
|
No errors occurred.
|
|
|
|
.TP
|
|
|
|
1
|
|
|
|
No matches were found from any of the input files.
|
|
|
|
No errors occurred.
|
|
|
|
.TP
|
|
|
|
>1
|
|
|
|
One or more errors occurred.
|
|
|
|
It is unknown if matches were found.
|
2024-02-12 15:09:10 +00:00
|
|
|
.
|
2009-07-05 19:25:17 +00:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.TP
|
|
|
|
.B GREP
|
2024-02-12 15:09:10 +00:00
|
|
|
If
|
2009-07-05 19:25:17 +00:00
|
|
|
.B GREP
|
2024-02-12 15:09:10 +00:00
|
|
|
is set to a non-empty value,
|
|
|
|
it is used instead of
|
|
|
|
.BR "grep" ,
|
2021-11-13 08:11:57 +00:00
|
|
|
.BR "grep \-E" ,
|
2009-07-05 19:25:17 +00:00
|
|
|
or
|
2021-11-13 08:11:57 +00:00
|
|
|
.BR "grep \-F" .
|
2024-02-12 15:09:10 +00:00
|
|
|
.
|
2009-07-05 19:25:17 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR grep (1),
|
|
|
|
.BR xz (1),
|
|
|
|
.BR gzip (1),
|
|
|
|
.BR bzip2 (1),
|
2011-03-19 11:08:22 +00:00
|
|
|
.BR lzop (1),
|
2020-09-25 01:35:18 +00:00
|
|
|
.BR zstd (1),
|
2009-07-05 19:25:17 +00:00
|
|
|
.BR zgrep (1)
|