Skip to main content

tail Command

The tail command returns the last n elements of the input stream. The beginning of the stream is consumed but discarded.

The command returns 100 elements by default if the number of elements is not specified.

Usage​

tail <n>

Parameters​

ParameterDescriptionRequired?Default Value
nNumber of elements to return❌100

Examples​

> json [1,2,3,4,5] | tail -2
​4
​5
> query is(volume) | tail -2
​kind=aws_ec2_volume, id=vol-0, name=vol-0, age=2mo1d, cloud=aws, account=dev, region=us-west-2
​kind=gcp_disk, id=123, name=gke-1, age=7mo22d, cloud=gcp, account=eng, region=us-west1, zone=us-west1-a