从去年输出文件行第一击 [英] Output file lines from last to first in Bash

查看:91
本文介绍了从去年输出文件行第一击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示的最后十行我的日志文件中,从最后行的 - 像一个正常的日志读取器。我认为这将是tail命令的变化,但我不能找到这个任何地方。

I want to display the last 10 lines of my log file, starting with the last line- like a normal log reader. I thought this would be a variation of the tail command, but I can't find this anywhere.

推荐答案

我最终使用尾-r ,它曾在我的OSX( TAC 不)

I ended up using tail -r, which worked on my OSX (tac doesn't)

tail -r -n10

这篇关于从去年输出文件行第一击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆