Linux command-line: Reverse output of any command using 'tac'

preview_player
Показать описание
Linux (GNU Coreutils package) comes bundled with an exciting tool called 'tac'. This is nothing but 'cat' spelled in reverse and works likewise.

This short video will teach you how to reverse the output of any command or I/O stream using the 'tac' command.
Рекомендации по теме
Комментарии
Автор

Oh that also simple too many thank to make me found that command.

kositsaw-kow
Автор

Been doing it wrong all these years. Got so used to just using "less +G" to start at bottom of a file then scrolling up, This is much easier. (less typing :P ). Will be using this for now on. Thanks for sharing :D

bradn
Автор

Nice! I love little videos about Unix and GNU utilities I never knew existed.

Your note about how there are command line flags to reverse output, but they are hard to remember and piping through tac is easier and more general, reminds me of Pike and Kernighan's famous presentation on Unix Program Design that is colloquially known as "cat -v considered harmful".

fennecbesixdouze
Автор

that's a super cool looking shell prompt, can you share it's configs?

lsudo
Автор

ls -r does reverse and is faster since it’s native and not resorting an already sorted output, but of course you’re right that “tac” has many more useful applications.

magicmulder
join shbcf.ru