0

有什么办法可以按时间倒序排列 Log cat 条目?

4

1 回答 1

0

The tac(1) utility from the Debian / Ubuntu package coreutils can easily print files in reverse. tac /path/to/log/file

If you don't have tac(1) installed, perhaps you have nl(1), sort(1), and cut(1) installed; try nl /path/to/log/file | sort -rn | cut -f2-

于 2011-12-29T05:07:28.900 回答