nano SIEM
Search Commands

reverse

Supported in:Self-hosted

Flip the order of the rows.

Use reverse to flip the current order of your result rows without choosing a new sort field.

Syntax

... | reverse

How it works

  • reverse flips the current order without sorting on a new field.
  • On raw events, which come back newest first, reverse puts them oldest first. * | reverse | head 20 gives the 20 oldest events in the time range.
  • After head N, reverse shows those N events oldest first.

Examples

The first logons in the time range, oldest first:

class_uid=3002 | reverse | head 20 | table time, user.name, src_endpoint.ip

The ten newest process launches, in reading order:

class_uid=1007 | head 10 | reverse | table time, device.hostname, process.cmd_line

Flip an aggregated ranking to show the smallest groups first:

class_uid=4002 | stats count by http_request.url.hostname | reverse

Notes

  • To order by a field, use sort directly (sort -count rather than sort count | reverse).

reverse also works after a lookup, prevalence, inputlookup, resolve_identity, or ai stage.

What's next

On this page