linux - 如何在Linux终端中搜索单词

标签 linux shell terminal command

我使用终端窗口很长时间了,有很多标准输出打印。这里我需要命令来搜索 Linux 终端(stdout)历史记录中的某个单词。就像在文本文档中查找选项一样。

最佳答案

要搜索已执行的命令,请运行以下命令

    history |grep 'your search word goes in here'

关于linux - 如何在Linux终端中搜索单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18547886/

相关文章:

linux - 如何设置启动时init的资源限制?

c++ - 如果命令不只是打印结果,而是进入某种交互模式,如何处理 C++ 终端命令执行的输出?

linux - 尝试按照此处的答案在我的终端中显示 git 分支,但它似乎不起作用

php - Rancher 操作系统 : generate data in one container and set as environment variable in another container

linux - 如何只提取 ELF 部分的原始内容?

java - 运行java类文件的简单方法(终端)

terminal - 打印到终端会导致 OOM(内存不足)吗?

linux - 帮助 bash 脚本

linux - 如何在 Linux 中组织我的文件/文件夹?

android - 无法在 Ubuntu 上启动 uiautomatorviewer