Hacker News new | past | comments | ask | show | jobs | submit login
Unix Toolbox (cb.vu)
491 points by lostbit on Aug 7, 2015 | hide | past | favorite | 38 comments



Unix Rosetta Stone is also very useful: http://bhami.com/rosetta.html


I've recently started using Arch and their Pacman Rosetta has helped me a lot, it has equivalences in package managers for all the popular distros: https://wiki.archlinux.org/index.php/Pacman_Rosetta


And the Rosetta Stone of Performance Checklists:

http://www.brendangregg.com/USEmethod/use-rosetta.html


It was on my bookmarks for a long time. I thought it would be nice to share with you guys.

There are so many times I do searches on HN to recall about some nice things I've seen oh the web... Quite often, the comments are the gems!


Yeah I found this via HN a couple years ago. This along with the following links will help anyone getting into sysadmin work:

https://github.com/jlevy/the-art-of-command-line | https://www.bento.io/grid | https://www.sqlteaching.com/


https://nixsrv.com/llthw is the real deal (IMHO).


Bookmarked! I know a few getting into linux that could take advantage of this.


Bro Pages (instead of "man" pages) is a similar resource I find myself using surprisingly often http://bropages.org/browse


That project is a symptom of manual pages not having good “EXAMPLES” sections. The examples on that web page should be contributed upstream to the manuals pages of the software that they are for.

If you want a fast way to read the EXAMPLES section only for a command, here is a shell function which creates an ‘eg’ command which only displays the “EXAMPLES” section of manual pages:

  eg(){
      MAN_KEEP_FORMATTING=1 man "$@" 2>/dev/null \
          | sed --quiet --expression='/^E\(\x08.\)X\(\x08.\)\?A\(\x08.\)\?M\(\x08.\)\?P\(\x08.\)\?L\(\x08.\)\?E/{:a;p;n;/^[^ ]/q;ba}' \
          | ${MANPAGER:-${PAGER:-pager -s}}
  }
Usage:

  $ eg tar
  EXAMPLES
       Create archive.tar from files foo and bar.
             tar -cf archive.tar foo bar
       List all files in archive.tar verbosely.
             tar -tvf archive.tar
       Extract all files from archive.tar.
             tar -xf archive.tar
  $


Any ideas where I'd find how to submit the man page patches? Some upstreams are incredibly hard to find.


Can you give me an example? What I’d do it look at the Debian package, which both documents where upstream is and has a bugtracker of its own which you can submit suggestions to, and the Debian maintainer should forward the submission to upstream if appropriate.


Aaand it eludes me - I'll keep that in mind for the next time I find a manpage without examples.


Thank you, this is really helpful.

Could anyone contribute a version for OSX?


If you have homebrew you can just install the 'gnu-sed' package and then change the function to call 'gsed' instead.


Here's my terribly hackish version for BSD userlands (briefly tested on FreeBSD, may work on OS X):

    #!/bin/sh
    eg () {
        man $1 | grep '^E.EX.XA' -A 1000 | grep '^[A-Z]' -m 2 -B 1000 -A 0 | sed '$d' | $PAGER
    }
    eg $1


Damn, I remember the HN thread about that. The derailing was phenomenal. Interesting that the project lives on.


Although slightly different, Commandlinefu is a similar project with many number of entries: http://www.commandlinefu.com

It also has a terminal client called "fu": https://github.com/samirahmed/fu


just tried out to install bro pages with a fresh ruby 2.2.1 from rvm on OS X and got this reproducable. Seems broken for me:

    $ bro curl
    The curl command isn't in our database.


You might have an easier time getting tldr pages to work: https://github.com/tldr-pages/tldr


An excellent page to keep handy or for browsing! Thanks for the link.

A different (but related) resource: http://explainshell.com - good for deciphering those tricker commands.


this is an incredibly useful shortlist of commands, most of these I've used before - some I've used and forgotten (mount -o remount,ro)


This is pretty great. Would be cool to get a filtered list based on the OS you were using.


That's one the advantages of Rosetta Stone - http://bhami.com/rosetta.html

It was posted elsewhere in this thread first — https://news.ycombinator.com/item?id=10023535 — so don't vote my comment up.


hostname -i on cb.vu says the IP address is 78.31.70.238, but if you ping a host from the interface, the pings originate from 178.33.34.4 (according to tcpdump).


I love the "why not try this" attitude of your comment.

Is this due to an LB fronting?


On this system hostname -i says 127.0.1.1, despite this address not being set on any of my interfaces (lo0 is 127.0.0.1).


It looks like hostname -i is getting its value from /etc/hosts. hostname --all-ip-addresses returns the correct result.


ip route get 8.8.8.8 | head -1 | cut -d' ' -f8


This is really incredible list. Very useful when in need. Especially the switches that come in very handy.


> 2.2 Priority - ... Every command launched from this shell will have a lover priority. ...

You probably meant lower :)


What an awesome list. Props!


This is awesome, thanks!


I used to know a lot of this stuff. With Puppet, Chef, and then Ansible, I've found myself needing to know less and less of it.


And instead you now need to know a layer of abstraction and relearn that layer whenever it re-invents itself.


What is with cb.vu? It takes you to the shell prompt...



Nice list! Bookmarked.


This is great. Could use more on the Mac OS X side, though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: