I have a lot of gz compressed log files which have generic names and I need to check the period of time they reflect. I know about the zcat | head but this works for the beginning of the file only.
How can I just get the last line without decompressing the whole file?
Best Answer
If you want lines from the tail-end of a file rather than the head-end, use
tail
instead ofhead
: