Live data from Hacker News

Less Commonly Used Unix Commands

danielmiessler.com

21–30 of 95 posts

Re: Less Commonly Used Unix Commands

#21
post #9
post #6

vim and xargs are less commonly used commands? Seems to be a mix here of small unix-y utilities and larger programs (like vim and tmux). Good stuff to know though.

FTA: vim: attack yourself Emacs user?

Emacs User at Work:

http://fc04.deviantart.net/fs71/i/2011/029/8/3/emacs_user_at...

Re: Less Commonly Used Unix Commands

#22

popd and pushd are commands that, once learned, I thought would change my life forever. Turns out, not so much. :| EDIT: 'watch mtr' is handy for keeping an eye on your network connection, and finding slowdowns.

Using some aliases you can have pushd automatically. What then ends up useful with that is you can use ~1 ~2 ~3 ... to refer to old directories. That will change your life :)

http://unix.stackexchange.com/questions/4290/aliasing-cd-to-...

Re: Less Commonly Used Unix Commands

#23
post #12

Plenty on this list are well known but there are some nice ones that either I'd forgotten about or didn't know : column, ss, comm, fc I'd add the following to the list : printf , bc Also, "ddate" is fun. I had no idea and just spent an enjoyable 10 minutes looking it up. Thanks for posting this.

Since you seem to know what "ss" is, mind if I ask for a link? It's rather hard to search for :/

Re: Less Commonly Used Unix Commands

#24
post #11

Site's non-responsive now, wonder what the list was? I'll vote for "yes" which at least seems intuitively useful in a "yes | rm -i something" kind of way. Well that specific example is useless... Also over two decades ago if you obtained access to someones account it was considered highly amusing to end their .profile with a call to /bin/yes. Oh and before the newfangled /dev/urandom (or /dev/zero) we used to redirec…

    column: create columns from text input
    tr: translate/substitute/delete input
    join: like a database join but for text
    comm: file comparison like a db join
    paste: put lines in a file next to each other
    rs: reshape arrays
    jot: generate data
    expand: replace spaces and/or tabs
    time: track how long a task takes to run
    watch: execute something on a schedule in realtime
    xargs: execute something on all inputs
    iftop: visually show network traffic
    htop: show system stats more powerfully
    xxd: manipulate files in hex
    mtr: powerful traceroute replacement
    mdfind: osx find replacement that uses spotlight
    brew: osx package manager
    df: disk usage
    du: disk usage
    dig: dns queries
    host: dns queries
    man ascii: lookup your ascii
    sshfs: mount a directory through ssh
    wget: get w’s
    tmux: a better screen
    pushd: push your pwd to a stack
    popd: pop pwd off your stack
    lsof: godlike
    ncat: use this instead of nc
    fuser: kills locking processes
    vim: attack yourself
    tac: cat in reverse
    rename: change spaces to underscores in names
    open .: in osx, open finder in the current dir
    lsmod: show kernel modules
    printf: change the format of output
    timeout: execute something and kill it soon after
    disown: protect a job from disconnect
    fc: edit your last command in your editor and execute it
    sudo !!: repeat last command with sudo
    tee: send output to stdout as well
    pgrep: greps through processes
    pkill: kills processes based on search
    fmt: text formatter
    bc: an interactive calculator language
    apropos: info on commands
    strace: the uber debug tool
    man units: interesting
    pstree: shows processes in a…well…tree
    ddate: wtf
    zgrep: grep within compressed files
    zless: look at compressed files
    readlink: read values of links
    atop: another top
    split: break a file into pieces
    dd: disk writing
    ndiff: show differences in mmap scans
    ss: show apps using the internet

Re: Less Commonly Used Unix Commands

#25
post #23
post #12

Plenty on this list are well known but there are some nice ones that either I'd forgotten about or didn't know : column, ss, comm, fc I'd add the following to the list : printf , bc Also, "ddate" is fun. I had no idea and just spent an enjoyable 10 minutes looking it up. Thanks for posting this.

Since you seem to know what "ss" is, mind if I ask for a link? It's rather hard to search for :/

http://linux.die.net/man/8/ss

Re: Less Commonly Used Unix Commands

#26

One that I have recently been using more and more is time, but don't forget there is a difference between bash's "time" command and /usr/bin/time . I use both. The majority in the list seem pretty common, but I guess with more and more gui dependents some people just never spent days wading through man pages or info coreutils, so still useful.

/usr/bin/time is really useful, because it has the-v flag which tells you memory and processor usage.

Re: Less Commonly Used Unix Commands

#27

popd and pushd are commands that, once learned, I thought would change my life forever. Turns out, not so much. :| EDIT: 'watch mtr' is handy for keeping an eye on your network connection, and finding slowdowns.

i also tried to use pop/pushd ...tried hard. and never got it integrated into the work flow. however this guy's method has saved me a lot of keystrokes (very handy if one has a few, frequently visited, yet deeply nested, directories): http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-f...

Re: Less Commonly Used Unix Commands

#29
A very useful curl switch that I discovered, resume of partially downloaded file ! -C or --continue-at . When offset is "-", curl will use the output file to figure out the offset.

curl -C - -o "some_file"

It will basically get the size of "some_file" and use it as an offset when making the HTTP request, similar to wget --continue.

Very useful to download a file from a unreliable network and when you need all those security cookies. To get the cookies I use "Copy cURL" from Network pane of Chrome's "Developer tools".

Re: Less Commonly Used Unix Commands

#30
There is dstat missing from the list. It's a tool that shows the information of vmstat, iostat, netstat and ifstat in a clearer and with colors ;)

I use it primarly to see the used bandwidth in real-time. It's better than ifstat for that job.

Post reply on HN