1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.zh/common/zfgrep.md
Jin e5305a1865
common/z*: add Chinese translation (#14773)
* common/z*: add Chinese translation

* Update zoxide.md

* Update zoxide.md
2024-12-03 22:52:45 -08:00

25 lines
773 B
Markdown

# zfgrep
> 在可能压缩的文件中匹配固定字符串。
> 相当于 `grep -F`,如果必要,将先解压输入。
> 更多信息:<https://manned.org/zfgrep>.
- 在文件中搜索一个确切的字符串:
`zfgrep {{搜索字符串}} {{路径/到/文件}}`
- 计算在文件中匹配给定字符串的行数:
`zfgrep --count {{搜索字符串}} {{路径/到/文件}}`
- 显示文件中匹配行的行号:
`zfgrep --line-number {{搜索字符串}} {{路径/到/文件}}`
- 显示所有不包含搜索字符串的行:
`zfgrep --invert-match {{搜索字符串}} {{路径/到/文件}}`
- 仅列出内容至少匹配搜索字符串一次的文件名:
`zfgrep --files-with-matches {{搜索字符串}} {{路径/到/文件1 路径/到/文件2 ...}}`