Answer the question
In order to leave comments, you need to log in
Is it possible to make the ubuntu terminal not remember the history of new ones, only a few old ones?
Good afternoon. Let me explain in more detail what I wanted. Before launching a terminal in Ubuntu, I almost always go into the .bash_history file and delete all but the first few commands. Then I work, a few commands are typed, the next day I go there, and delete everything except the first few pieces. So, is it possible to make it so that when the terminal starts, it pulls up several commands that I need, then for the duration of the session it saves the history of commands, it was possible to sort through the up and down arrows, but when it was closed, everything was deleted, and the next time it was started, there were only the first few commands that you need?
Answer the question
In order to leave comments, you need to log in
1. make .bash_history read-only
2. On exit, break the connection, not disconnect - then the history in memory bash will not have time to be stored in memory
3. Explain normally what you are trying to solve, I can’t come up with a crutch solution instead of using aliases and functions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question