Bash history put into sqlite so it can be searched
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lawl baa0d58a47 Fix a bug in DB migration 1 week ago
.gitignore Init+ minor improvements 4 weeks ago
LICENSE add LICENSE 3 weeks ago Add DB migrations 1 week ago
go.mod add(): Log current timestamp too 1 week ago
go.sum add(): Log current timestamp too 1 week ago
main.go Fix a bug in DB migration 1 week ago


hs9001 (history search 9001) is an easy, quite simple bash history enhancement. It simply writes all your bash commands into an sqlite database. You can then search this database.


From source

go build
#move hs9001 to a PATH location

Debian / Ubuntu

Latest release can be installed using apt

curl -s | sudo apt-key add -
echo "deb default main" | sudo tee /etc/apt/sources.list.d/quitesimple.list
sudo apt-get update
sudo apt-get install hs9001


wget -O /etc/apk/
echo "" >> /etc/apk/repositories
apk update
apk add hs9001

Setup / Config

Add this to .bashrc

if [ -n "$PS1" ] ; then
    PROMPT_COMMAND='hs9001 add -ret $? "$(history 1)"'

By default, every system user gets his own database. You can override this by setting the environment variable for all users that should write to your unified database.

export HS9001_DB_PATH="/home/db/history.sqlite"


hs9001 search [search terms]

It is recommended to create an alias for search to make life easier, e. g.:

alias searchh='hs9001 search'