Does/can Bash history store the location where a command was run in addition to what the command was and the date?
I'm trying to retrace some commands that were run and trying to work out which folder they were run in.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityBash does not store the name of the current working directory in its history, but may be made to store a timestamp by setting the HISTTIMEFORMAT
to a strftime(3)
format string:
HISTTIMEFORMAT="%F %T"
will create timestamps on the form "YYYY-MM-DD HH:MM:SS".