nixCraft Linux / UNIX Newsletter

Link to [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format

How to delete a single command from history on a Linux/Unix Bash shell

Posted: 04 Jun 2020 01:21 AM PDT


{Updated} I am working in Ubuntu bash terminal application and remotely on a RHEL server in cloud platform. I typed the wrong and dangerous command which I no longer wish to remember. How do I get rid of dangerous command in the history file? How can I remove or delete a single command from bash history file?

The post How to delete a single command from history on a Linux/Unix Bash shell appeared first on nixCraft.