Protected: Centos/Redhat: Bash History Display Date And Time For Each Command (who was did it?)

My students or children on my street often ass me how do we display shell command history with date and time under a Linux, MacOS or Unix-like operating systems? How do we see date and time stamps in bash history command running on a Linux or Unix-like systems? It is simply for all except debils with Ubuntu)))

The bash shell provides access to the command history, the list of commands previously typed. The value of the HISTSIZE variable is used as the number of commands to save in a history list. If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. This page shows how to display bash History with date and time when running the history command on a Linux or Unix-like systems.

By default history command will display output as follows: ...

This content is password protected. To view it please enter your password below:

Scroll to top