Sometimes it's useful to cat a file in reverse order. An example would be doing things like parsing log files and such. I had a need to do this today and stumbled onto the cleverly named tac program. Usage is simple:
tac somefile.txt > somefile_reversed.txt
Tuesday, August 19, 2008
Subscribe to:
Post Comments (Atom)
2 comments:
I had to do some work to some directories recursively, where I had to make modifications in order from the deepest directories to the the closest directories to the root of the call. 'find ... -type d | tac' came in handy for that. An nice command indeed.
great, that is a nice tip!
Post a Comment