Top "Tail" questions

The tail is the part of a list that comes after the head.

PowerShell equivalent for "head -n-3"?

I've been able to track down basic head/tail functionality: head -10 myfile <==> cat myfile | select -first 10 tail …

powershell tail unix-head
How would you implement tail efficiently?

What is the efficient way to implement tail in *NIX? I came up (wrote) with two simple solution, both using …

c linux unix tail
Tail -f - Show last X lines that match a pattern

I'm trying to achieve the equivalent of tail -f -n10 for a matched pattern. At first I thought tail -f …

grep match tail
How to output lines 800-900 of a file with a unix command?

I want to output all lines between a and b in a file. This works but seems like overkill: head …

command-line tail head
Shell Script to get exception from logs for last one hour

I am developing script which will grep logs of last one hour and check any exception and send email for …

shell parsing grep solaris tail
Is "tail +2" supported by Linux?

I noticed that tail +2 is supported in Solaris ksh, but in Red Hat Linux, an error will occur: c008>&…

tail
pipe tail output into another script

I am trying to pipe the output of a tail command into another bash script to process: tail -n +1 -f …

bash parameters pipe tail
Implement "tail -f" in C++

I want to create a small code in C++ with the same functionality as "tail-f": watch for new lines in …

c++ tail
How do you continuously read a file in Java?

I'm trying to figure out how to continuously read a file and once there is a new line added, output …

java file-io tail
select the second line to last line of a file

How can I select the lines from the second line to the line before the last line of a file …

linux unix head tail