Use bash’s comment char (
#) at the command-line prompt to leave yourself a trail of breadcrumbs back to how, why and when, e.g.
To retrieve your comment breadcrumbs pipe the output from the
history command to
grep to filter lines containing bash’s comment char (
Breadcrumbs are even more useful if you configure the
HISTTIMEFORMAT environmental variable by adding the following line to your
1 2 3 # ~/.bashrc # show the date and time export HISTTIMEFORMAT="%Y-%m-%d %T "
To add the
HISTTIMEFORMAT variable to your
.bashrc and re-source the file do:
history | grep \# output will also provide date/time when the line was added to the
.bash_history file like: