Live data from Hacker News

Favorite Unix Commands

clippy.in

21–30 of 135 posts

Re: Favorite Unix Commands

#22
Handy addition to the "mount | column -t" trick:

You can use this within Vim to pretty-format text tables, initialization of variables, etc. Just highlight the lines in question in visual line mode (V) and type

    !column -t
to pipe the lines through the column command.

Re: Favorite Unix Commands

#25
post #8

faucet 80 --in cat This is useful for creating a connection for receiving the input of what you get... e.g. running faucet 80 --in cat and later curl http://127.0.0.1:80 will deliver to you console : GET / HTTP/1.1 User-Agent: curl/7.21.4 (i686-pc-linux-gnu) libcurl/7.21.4 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.19 Host: 127.0.0.1:900 Accept: /

Just some additional information:

Faucet is part of "netpipes", which is available for most Unixoid operating systems. I guess it was inspiration to build "netcat". But netcat was a absolute terrible hack of a program, so "socat" (socket-cat?) was born.

http://www.dest-unreach.org/socat/

In case you need the functionality of bash's /dev/tcp [1] and you are pondering to install netcat or netpipes, do yourself a favor and just go for socat, it's insanely more powerful, read the manpage, read the examples!

http://www.dest-unreach.org/socat/doc/socat.html#EXAMPLES

--

[1] but debian and ubuntu have decided to compile without it... https://bugs.launchpad.net/ubuntu/+source/bash/+bug/215034

Re: Favorite Unix Commands

#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.

Re: Favorite Unix Commands

#28

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

When rewriting large amounts of ASCII text (or comments in Code), I really find "par" helpful.

    : Just use it in :
    : vi with your cursor in front of a badly wrapped block of text. :
    : Press !}par and the text will be :
    : piped to par :
    : which fixes up :
    : the :
    : formatting and keeps aligned frame markers :
    : intact magically. :


    : Just use it in vi with your cursor in front of a badly wrapped   :
    : block of text. Press !}par and the text will be piped     :
    : to par which fixes up the formatting and keeps aligned frame     :
    : markers intact magically.                                        :
http://www.nicemice.net/par/ (or apt-get install par)
Post reply on HN