0

Is there any way to make the Log cat entries in in Reverse Chronological Order?

Mithun Sreedharan
  • 49,883
  • 70
  • 181
  • 236

1 Answers1

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-

sarnold
  • 102,305
  • 22
  • 181
  • 238