Live data from Hacker News

Favorite Unix Commands

clippy.in

31–40 of 135 posts

Re: Favorite Unix Commands

#31
post #27

Please comment if you have a favorite not on this list.

tsort. It's pointless until you need it, but when you need it, it's totally awesome . less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.

Hm, can you start at the end of file without reading the entire file with less? Use case is tailing large logs.

Re: Favorite Unix Commands

#32
post #27

Please comment if you have a favorite not on this list.

tsort. It's pointless until you need it, but when you need it, it's totally awesome . less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.

> less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously.

If you do this on my servers, I am going to find you, and then I am going to kill... um... your process.

less with SHIFT-F takes a whole CPU core to run on a busy log file. tail -f takes almost nothing to run. Now combine that information with the reality of a whole bunch of devs who don't know it or don't care about it. :(

Re: Favorite Unix Commands

#33

Ctrl+l is my most used command. I need a clean terminal

I second this, I also find myself impulsively smashing enter multiple times sometimes between commands, if I am typing in a series of commands, its just so my brain can catch up with what I want to do.

Re: Favorite Unix Commands

#34
post #27

Please comment if you have a favorite not on this list.

tsort. It's pointless until you need it, but when you need it, it's totally awesome . less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.

multitail[1] is also really nice for following multiple log files. It can do highlighting of lines based on regex's, and has built-in highlighting of a wide variety of log formats

[1] http://www.vanheusden.com/multitail/features.php

Re: Favorite Unix Commands

#36
post #31
post #27

Earlier quoted context omitted.

tsort. It's pointless until you need it, but when you need it, it's totally awesome . less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.

Hm, can you start at the end of file without reading the entire file with less? Use case is tailing large logs.

Yes. It is CPU intensive (see auntie post above).

Re: Favorite Unix Commands

#37
post #6

Earlier quoted context omitted.

'tac'. It is 'cat', but backwards.

Are you some kind of genius?

If you enjoy 'tac', you might also enjoy 'sponge'.

Spong 'soaks up' input an releases it all on one chunk so that you can do things like:

  cat foo | sponge foo
(`cat foo > foo` does not work)

That's neat and all, but what if you don't have sponge? Well, just use tac twice!

  cat foo | tac | tac > foo
(Obviously this is rather wasteful ;))

Re: Favorite Unix Commands

#38
post #35

Please comment if you have a favorite not on this list.

If you use tmux (or screen) you want to use byobu! https://launchpad.net/byobu https://www.google.de/search?q=byobu+tmux&tbm=isch It's a fancy statusbar that shows CPU speed, IP-address, hostname, ...

Another option is tmux-powerline[1]

[1] https://github.com/erikw/tmux-powerline

Re: Favorite Unix Commands

#40
post #34
post #27

Earlier quoted context omitted.

tsort. It's pointless until you need it, but when you need it, it's totally awesome . less. Overkill, but SO MUCH BETTER THAN tail -f. Seriously. You can toggle "follow mode" without losing your place in the incoming stream.

multitail[1] is also really nice for following multiple log files. It can do highlighting of lines based on regex's, and has built-in highlighting of a wide variety of log formats [1] http://www.vanheusden.com/multitail/features.php

Does anybody know if there is a good standalone regex highlighter? I usually use `ack --passthru`, but that has always seemed a tad.. overkillish to me.
Post reply on HN