bash-eternal-history

command module
v0.0.0-...-eb2bac1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 20 Imported by: 0

README

bash-eternal-history

This is a simple filesystem in userspace that contains a single file .bash_eternal_history created for the purpose of storing your bash history indefinitely and across many systems. The filesystem makes use of AWS DynamoDB to store every command entered in bash which may be appended to by multiple sessions simultaneously.

Setup

  1. Download the latest release from GitHub: https://github.com/kurtmc/bash-eternal-history/releases/latest
  2. Create systemd service to automatically mount the filesystem, example configuration:
[Unit]
Description=Mounts bash eternal history

[Service]
Type=simple
Environment=AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
Environment=AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Environment=AWS_REGION=ap-southeast-2
ExecStartPre=/usr/bin/mkdir -p %h/.bash-eternal-history-fuse
ExecStart=/opt/bash-eternal-history/bash-eternal-history %h/.bash-eternal-history-fuse
ExecStop=/usr/bin/umount %h/.bash-eternal-history-fuse

[Install]
WantedBy=default.target
  1. Create a symlink to .bash-eternal-history-fuse
ln -s -f $HOME/.bash-eternal-history-fuse/.bash_eternal_history $HOME/.bash_eternal_history
  1. Configure bash history in ~/.bashrc, see: https://stackoverflow.com/a/19533853
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
export HISTFILE=~/.bash_eternal_history
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
  1. Profit.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL