zwischenzugs

Centralise Your Bash History

Advertisements

Why?

Have you ever run a command on one of your hosts and then wanted to retrieve it later? Then couldn’t remember where you ran it, or it’s lost from your history?

This happens to me all the time. The other day I was hunting for a command I was convinced I’d run, but wasn’t sure where it was or whether it was stored.

So I finally wrote a service that records my every command centrally.

Here’s an overview of its (simple) architecture.

 

 

What?

This stores your bash history on a server in a file.

The service runs on a port of your choosing, and if you have some lines in your ~.bashrc file then it will all work seamlessly for you.

There’s some basic authentication (shared key) to prevent abuse of the service.

How?

To set up, see the README.

Requirements

Needs socat installed, and bash version 4+.

Related posts

Ten Things About Bash
Ten More Things About Bash

PS

I need help to improve this – see the README.

PPS

If you ask nicely I might host it for you, without warranty etc..

 


If you want to learn more about bash, read my book Learn Bash the Hard Way, available at $5:

Advertisements

Advertisements