HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
fredsmith
history-db
Command Line2015–2016
fredsmith / history-db

history-db

bash history collector. Web (php/mysql) component plus bash functions

2Distinct people
2Mentions
0Explicit recommenders
1GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

bash history collector. Web (php/mysql) component plus bash functions

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month2 dated mentions

Observed mentions: 2015-09-03 12:45:09 UTC to 2016-05-31 15:31:45 UTC.

012015-09-01 00:00:00 UTC to 2015-10-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 20152015-10-01 00:00:00 UTC to 2015-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-11-01 00:00:00 UTC to 2015-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-12-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2016-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJan 20162016-02-01 00:00:00 UTC to 2016-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-03-01 00:00:00 UTC to 2016-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-04-01 00:00:00 UTC to 2016-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-05-01 00:00:00 UTC to 2016-06-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 2016

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Sep 20152015-09-01 00:00:00 UTC2015-10-01 00:00:00 UTC101
Oct 20152015-10-01 00:00:00 UTC2015-11-01 00:00:00 UTC000
Nov 20152015-11-01 00:00:00 UTC2015-12-01 00:00:00 UTC000
Dec 20152015-12-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
Jan 20162016-01-01 00:00:00 UTC2016-02-01 00:00:00 UTC000
Feb 20162016-02-01 00:00:00 UTC2016-03-01 00:00:00 UTC000
Mar 20162016-03-01 00:00:00 UTC2016-04-01 00:00:00 UTC000
Apr 20162016-04-01 00:00:00 UTC2016-05-01 00:00:00 UTC000
May 20162016-05-01 00:00:00 UTC2016-06-01 00:00:00 UTC101

What Hacker News says

2 sources
I've been tempted to do something similar. The context information (e.g. environment, working directory) would be especially helpful, since that's what I'm currently missing. Have you tried https://github.com/umang1912/advanced-shell-history? That was where I planned to start. Here are a few other projects: https://github.com/thenewwazoo/bash-history-sqlite # simple shell script to store Bash history into SQLite3 database https://gist.github.com/pklaus/1e381be8592426568df9 # simple Python script to store Bash history into Pandas dataframe https://gist.github.com/pklaus/26925cfa1fc6b370e043 # simple Python script to store Bash history in SQLite3 database https://github.com/fredsmith/history-db # store Bash history in PHP/MySQL web server https://github.com/joshuacronemeyer/shellsink # store Bash/Zsh history in Python web server
In How and Why to Log Your Bash History
$ history | wc -l 56201 I use a simple prompt_command hook to push my history (from all my machines) to a central MySQL database(https://github.com/fredsmith/history-db). Entries are de-duped and a tally is kept so I can do simple ad-hoc reporting: mysql> select * from history order by count DESC limit 10; +-------+---------------------+-----------+----------+-------+ | id | timestamp | command | hostname | count | +-------+---------------------+-----------+----------+-------+ | 1 | 2015-09-02 19:41:45 | ls | xicada | 34458 | | 89 | 2015-09-02 14:58:33 | cd .. | xicada | 4332 | | 519 | 2015-08-24 18:38:55 | ll | xicada | 3229 | | 9 | 2015-09-02 12:37:05 | cd | xicada | 2250 | | 82 | 2015-08-28 18:27:07 | add | xicada | 1887 | | 329 | 2015
Read the rest
-08-31 18:22:49 | gs | xicada | 1817 | | 48 | 2015-09-02 19:17:26 | git pull | xicada | 1696 | | 275 | 2015-08-24 18:23:44 | df -h | xicada | 1529 | | 15708 | 2013-10-08 01:33:33 | grid unn1 | Europa | 1210 | | 44 | 2015-08-31 13:10:46 | git push | xicada | 1139 | +-------+---------------------+-----------+----------+-------+ 10 rows in set (0.02 sec) It's pretty useful (I search through my history constantly with ctrl-R or using bash's history-search-backward hotkeys), and having a 56K line history file doesn't seem to impact history searching or shell startup any noticeable amount.
In “I have [bash] history back to ~2003”

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.