LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "tail" function in linux (https://www.linuxquestions.org/questions/linux-newbie-8/tail-function-in-linux-622814/)

emp1953 02-21-2008 10:50 AM

"tail" function in linux
 
The tail function in Unix has a -r option which reverses the order of the lines in the file specified on the command line.

The tail function in Linux doesn't have the -r option.

Does anyone know of an equivalent function in linux?

Thanks

emp1953

bigrigdriver 02-21-2008 10:58 AM

head == tail -r

The head utility displays from the beginning of a file.

If that doesn't give you what you want, look at tac (the opposite of cat). It displayes the lines of a file in reverse order.

Or, possibly tail <filename> | tac would do the job.


All times are GMT -5. The time now is 04:57 PM.