My terminal history has hundreds of command, but I just want to keep a few of them
Is there a way to manually edit the list of command executed in the terminal?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
to review your history, open the terminal and just type
I would recommend making a copy first by opening a terminal and using this CLI
cp ~/.bash_history ~/.bash_history_old
then edit the "old" one, Once you are satisfied with the result run this
cp ~/.bash_history_old ~/.bash_history this will replace the current history. You will be prompted to overwrite y/n?