Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ログ猫のエントリを時系列の逆順で作成する方法はありますか?
tac(1)Debian / Ubuntu パッケージのユーティリティを使用すると、coreutilsファイルを簡単に逆方向に印刷できます。tac /path/to/log/file
tac(1)
coreutils
tac /path/to/log/file
インストールしていない場合はtac(1)、おそらくnl(1)、sort(1)、およびcut(1)インストールされています。試すnl /path/to/log/file | sort -rn | cut -f2-
nl(1)
sort(1)
cut(1)
nl /path/to/log/file | sort -rn | cut -f2-