Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i was bored so i decided to browse some man pages, in cat's man page there was a reference to a command called "tac", hmm interesting i decided to investigate turns out it is literally just cat but where line number 10 would be line number 1 line 2 would be 8 etc so i just wanted to ask why does it exist ? what's it's point ?
yes i can also read a man page i meant why would you ever use it ? why is it there ?
Oh. Sorry. Mis-read your OP.
Frankly, I didn't know about it until this thread. I tend to use tail to see the most recent entries in a file, but I can see how tac could be useful, since tail still displays in chronological sequence, where the reverse display might well be useful...it is, after all, how I sort messages in my email clients
jlinkels: TTY? THAT brought back memories...paper tape and all
I'm just going to ask this here because i don't want to open another thread for something so minor but any idea why calling it with no argv does not write to stdin unlike cat ?
you cat the file and then pipe that into another program ?
Imagine you want to process the data in a log file, but in reverse chronological order - tac fits the bill for piping the output to your data processor.
Imagine that you want to quickly look at the latest log. You know that something in the last x hours has caused the problem, but don't know when, so using tail is out of the question (how much tail would you want to see?) - tac piped through more fits the bill.
It may be seldom used, but tac still has its uses.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.