Linux
There comes a time when you just need to take a little off the top of a file, see what you are working with. That is where knowing how to use a utility like
<a href="http://man7.org/linux/man-pages/man1/head.1.html">head</a>can help. Just running:$ head filename.txt
Will get you
Print the first 10 lines of each FILE to standard output.
But what if that file does not have nice lines? Large SQL dump files come to mind.
headhas an answer. Use the-cflag to print the beginning bytes of a file instead of lines. Change the command above to:The Windows Subsystem for Linux (WSL) is one of the best features on Windows 10. It makes development so much easier than it used to be but still has a few hiccups. Kinda like Linux, some things don’t “just work.” One pesky thing that I recently dealt with was getting SSH to work with a keypair file from WSL. Here is how to get SSH working on WSL.
Goal
Given a keypair file, we want to invoke ssh from the command line and establish a tunnel to another server. This is a common task when connecting to remote servers. Think AWS, Azure, or Digital Ocean. It is a simple command:
Below are some notes on getting
<a href="https://github.com/edenhill/kafkacat#build">kafkacat</a>installed on an Amazon workspace with admin access.The commands listed on the GitHub page will not work without a little preparation. A Linux Amazon Workspace image is based on Amazon Linux. Attempts to use a package manager like
yumgo through a plugin,amzn_workspaces_filter_updates. This filter only has a handful of packages (30 at the time of this writing) that can be pulled. The first thing to do is add Extra Packages for Enterprise Linux, EPEL, to the instance’s package repository. Following the instructions on the Fedora FAQ run: