Older History of commands linux

9,393

Unfortunately, the answer is "no". With the Bash shell, the list of commands previously typed is stored in ~/.bash_history. As you've learned, all you can do is configure its (future) maximum size by setting the HISTFILESIZE shell variable.

You can also set HISTTIMEFORMAT if you'd like a time-stamp recorded along with each command.

Share:
9,393

Related videos on Youtube

Peter Hayek
Author by

Peter Hayek

Updated on September 18, 2022

Comments

  • Peter Hayek
    Peter Hayek almost 2 years

    I want to check history of commands on my linux server that dates 1month and 4 days old, but the history is showing up to 1 month only (I was late checking it earlier).

    I know the ' History ' command and how I can make it bigger in ~/.bashrc or ~/.bash_profile, but making it bigger will not fix this issue but it will fix it for future purposes, is there a way to fix that issue?

    Thanks