Unix: Some useful tools
On my current project we regularly use a few Unix tools which aren’t on the standard installation so I thought I’d collate them here so I don’t forget about them in the future.
ghex
We suspected we’d ended up with some rogue characters in a file that we weren’t able to detect in our normal text editor recently and wanted to view the byte by byte representation of the file to check it out.
We came across http://live.gnome.org/Ghex which seems to be a pretty decent tool for allowing us to do this.
sudo port install ghex
ghex2 ourFile.jade
axel
http://axel.alioth.debian.org/ is a download accelerator and lets us send multiple partial/range requests to download parts of a file before putting it back together at the end.
We found this quite useful when I was working in India to download files from the US over VPN. scp was painfully slow so we used to set up a simple HTTP server on the US server and then use axel to grab the file.
Some servers don’t support range requests but a reasonable number of them seem to.
sudo port install axel
axel -a http://www.cs.cmu.edu/~dga/papers/andersen-phd-thesis.pdf
ack
The man page claims the following:
Ack is designed as a replacement for 99% of the uses of grep.
It worked reasonably well for replacing the following grep command:
grep -iR "searchTerm" .
One of the cool things is that by default it doesn’t search in binary files whereas grep does. I have noticed that it sometimes doesn’t pick up search terms in files which grep would match and I’m not entirely sure why.
sudo port install p5-app-ack
ack "something"
I’m sure there are plenty of other cool tools about so if you know of any let me know!
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.