我尝试使用以下命令打开一组在特定日期后保存的文件
查看/*/*日志| grep '8 月 30 日'
但我收到一条消息 Vim: warning : output is not to a terminal
什么也没有发生。有什么建议么???
您实际上是在告诉view
打开所有日志文件。然后告诉它不要像往常一样将其输出发送到屏幕,而是发送到另一个名为grep
.
您可能想使用find
生成文件列表,然后告诉view
打开它们。因此,要查找昨天(1 天前)更改的文件,您可以使用:
find /wherever/the/logs/are -name \*.log -mtime -1
现在,您要编辑这些文件,因此将列表传递给view
:
view $(find /wherever/the/logs/are -name \*.log -mtime -1)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句