Linux history (history) command usage detailed

  
 

If you use the Linux command line often, then using the history command can effectively improve your efficiency. This article will introduce you to the 15 usages of the history command by way of example.

1. Displaying timestamps using HISTTIMEFORMAT

When you execute the history command from the command line, usually only the sequence number of the executed command and the command itself are displayed. If you want to see the timestamp of the command history, you can execute:

# export HISTTIMEFORMAT='%F %T '# history

Copyright © Windows knowledge All Rights Reserved