DGREP(1)
π DGREP π
okay bestie, welcome to dgrep β part of the Debian-goodies docs (that's the manual page you're holding, section 1). she's a lil shell script with main character energy and she's about to make your life SO much easier. grab a boba, sit down, let's go π«Ά
β¨ NAME β¨
dgrep, degrep, dfgrep, dzgrep β grep through files belonging to an installed Debian package. no cap, that's literally her whole job π
πΈ SYNOPSIS πΈ
dgrep [most grep options] pattern package...
dgrep --help
like. pattern first, then the package(s). simple as that β¨
π¦ DESCRIPTION π¦
okay so here's the tea β β dgrep invokes grep(1) on every single file in one or more installed Debian packages. every one. she's thorough like that.
the way she does it: she passes the package argument(s) over to dglob(1) to get a list of the files in those packages. and for matching the package names themselves, she uses dglob's substring pattern matching β so you don't even gotta type the full name, iykyk π
and HERE'S the cute part π β if you invoke dgrep under a different name, she switches up her whole vibe:
- as
degrepβ she usesgrep(1)with the-Eoption instead π₯ - as
dfgrepβgrep(1)with the-Foption, respectfully - as
dzgrepβ the commandzgrep(1)is used instead ofgrep(1)
(and the "etc." is doing a lot of heavy lifting there, so just know the pattern holds β¨)
π OPTIONS π
dgrep supports most of grep(1)'s options. like, the majority. please go check your grep(1) documentation (the manpage OR the texinfo manual, either one bestie) for a complete listing, because we're not reprinting the whole thing here π
only a FEW options are excluded, and that's because they don't conform with the intended behaviour. see the list below π
π Options of grep that are not supported by dgrep π
-r,--recursive,-d recurse,--directories=recurseβ nope, not supported π«-d read,--directories=readβ also not supported, sorry babe
so why?? okay so dgrep searches only in the "normal" files of a package. she skips all directories and symlinks. every single one. so obviously the options of grep that are specific to directories just... don't apply? they'd be giving nothing. hence: not supported π
lowkey important: if you came here expecting recursion, she's not gonna do it. she said what she said π
π AUTHOR π
- Matt Zimmerman
<mdz@debian.org>β the original icon π - This manpage was written by Frank Lichtenheld
<frank@lichtenheld.de>βοΈ
π COPYRIGHT AND LICENCE π
Copyright (C) 2001 Matt Zimmerman <mdz@debian.org>.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
On Debian systems, a copy of the GNU General Public License version 2 can be found in /usr/share/common-licenses/GPL-2.
β SEE ALSO β
and that's the whole page bestie, you ate that πβ¨ this one came to you courtesy of perl v5.40.1, dated 2025-12-06 β mwah, go grep something iconic ππ¦π
π¦ where this page comes from
- ubuntu resolute: debian-goodies 0.88.2ubuntu2 Β· GPL-2.0-or-later
- ubuntu stonking: debian-goodies 0.88.2ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms