![]() ![]() ![]() This one is mostly unrelated, but I’m mentioning it anyway. Clear Your Terminal for a Like-New Session Save the file, then restart your shell, and the lines you’ve deleted will stop showing up. One you’ve opened the file, you can delete any lines you’d rather not keep by hand. On Linux systems, replace open with the name of your preferred text editor, such as nano, vim, or gedit. On a Mac, type open ~/.bash_history and your default text editor will open the file. ~/.bash_history is a simple text document, which stores you Bash history.Īlternatively, you could open the file and delete any lines you’re concerned about. ![]() If you don’t know, rm is a longstanding command for deleting files in UNIX-based systems. If you want to remove the entirety of your history, run the following command: This command will prevent anything in your current session from being written to your long-term history, but does not clear out that long-term history. The history command is built into Bash itself, and the -c modifier tells the program to clear that history. Our first command, history -c, deals with the current session. There’s your current sessions’ history, and there’s your long-term history. Your history can be broke down into two chunks. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |