1

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.

1 Answer 1

1

Bash 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".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .