HostOnNet Blog

Enable Date and Time in history

Looking for Linux Server Admin or WordPress Expert? We can help.

Linux “history” command shows previous commands used in your server. This is good as you can see what commands are run on your server.

By default history do not show date and time of command execution. You can enable this by editing the file /etc/profile and adding following line as the last line.

HISTTIMEFORMAT=”%h.%d %H:%M”

Posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.