Live data from Hacker News

Less Commonly Used Unix Commands

danielmiessler.com

71–80 of 95 posts

Re: Less Commonly Used Unix Commands

#71
post #7

I found jq the other day ( http://stedolan.github.io/jq/ ), which is a commandline utility for manipulating json data, resembling awk. Considering the number of API's that return json data these days, it's simplified my life a great deal. It's proven especially useful for automation shell scripts, when working with things like the aws command line client that return all results as json. Usually I'm looking to extract…

On a similar note, there is also csvkit [1] for csv files. It is not quite as full featured as I had like, but it is easier than manipulating csv content directly via cut/column/grep/sed. [1] http://csvkit.readthedocs.org/en/latest/index.html

try csvfix: http://csvfix.byethost5.com/csvfix15/csvfix.html

Re: Less Commonly Used Unix Commands

#73
comm is the one I always forget the name when I need it. Because it's not cmp/diff but the idea is similar

Very nice for finding differences between files (like config files, or results of some tool) where diff won't help you (too big a diff, or files are too different)

Re: Less Commonly Used Unix Commands

#74

Earlier quoted context omitted.

Exactly - OS X is Unix(tm), but davexunit's complaint is that the term "Unix commands" implies "commands that will work on all/most UNIX/POSIX systems", not "commands for a single OS that happens also to be a UNIX".

I agree with the complaint too but not only are many of these commands mac only but in addition to that, they are not less commonly used (ex vim). I feel like I could have gotten quite a few less commonly used tools by ls /usr/bin/|sort -R|head In my opinion it was a poorly named article with just as poor content. Many of the descriptions of the commands were not good ("lsof: godlike"). Better descriptions could gene…

Even easier way to get short descriptions of commands:

    whatis lsof
    apropos lsof

Re: Less Commonly Used Unix Commands

#75

Earlier quoted context omitted.

I agree with the complaint too but not only are many of these commands mac only but in addition to that, they are not less commonly used (ex vim). I feel like I could have gotten quite a few less commonly used tools by ls /usr/bin/|sort -R|head In my opinion it was a poorly named article with just as poor content. Many of the descriptions of the commands were not good ("lsof: godlike"). Better descriptions could gene…

Even easier way to get short descriptions of commands: whatis lsof apropos lsof

Much better than my way. Formatting is nicer and I was using GNU specific flags for grep. :-(

Re: Less Commonly Used Unix Commands

#76

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 s…

When I'm on a bad connection, I like to download the file on a server somewhere, then rsync it locally. As long as my server and the server I'm downloading from are on fast connections, the initial step doesn't take long, and this frees me from worrying about expiring cookies or URLs or whatever.

Re: Less Commonly Used Unix Commands

#78
I was really enjoying the fact you had a tl;dr next to each one. Then I noticed this

    wget: get w’s
Ok, if I didn't know what wget did already that wasn't too useful. But then it gets worse

    vim: attack yourself

    man units: interesting

    ddate: wtf

Re: Less Commonly Used Unix Commands

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

> Plenty on this list are well known... My thoughts exactly. Time, df, du, iostat, watch, htop, wget, tmux, .... Really?

Most people know only the bare minimum to move files around. Not everyone has spent their life on a nix command line.

And I don't even know why you'd think iostat, watch, htop, or tmux would be well-known amongst anyone other than sysadmins and long-time nix power users. And tmux didn't even exist five years ago.

Post reply on HN