lines starts with # and integers in .bash_history

I see lines contains #1582696021 . Whats is this? In SIEM we use it seems like a command running by user.

Any help or documentation would be appreciated.

Best

1 Answer

They are timestamps. From man bash

 HISTTIMEFORMAT If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions. This uses the history comment character to distinguish timestamps from other history lines.

The integer value is an epoch time - you can convert it to human readable time using date for example ex.

$ date -d @1582696021
Wed Feb 26 00:47:01 EST 2020

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like