[arch-general] [Xfce-terminal] Cannot remove entries from history
Hello, I've got the following rather suspicious problem with xfce-terminal: After removing entries from the history (using "history -d" or "history -c"), the entries are obviously buffered. When I close the terminal and the open another, the history is available again - for some reasons I do see this as a security risk. Can I remove the buffered entries somehow? Kind regards Peter
Hi Peter,
After removing entries from the history (using "history -d" or "history -c"), the entries are obviously buffered. When I close the terminal and the open another, the history is available again
Do you have a .bash_history file in your home directory. Does it gain new lines at the bottom as you enter commands in a terminal? Or only when the terminal exits? Do those lines include test ones that you've deleted? -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy
Am 11.01.19 um 11:14 schrieb Ralph Corderoy:
Hi Peter,
After removing entries from the history (using "history -d" or "history -c"), the entries are obviously buffered. When I close the terminal and the open another, the history is available again Do you have a .bash_history file in your home directory. Does it gain new lines at the bottom as you enter commands in a terminal? Or only when the terminal exits? Do those lines include test ones that you've deleted?
Yes, thank You, Ralph. Indeed, I forgot about that, as I'm usually not changing that. IMHO it's nevertheless a bad concept those removed commands are still stored inside this file. In my case, the problem was my sudo password, which I accidently typed in because sudo timeout had not yet been reached. Kind regards Peter
Hi Peter,
Does it gain new lines at the bottom as you enter commands in a terminal? Or only when the terminal exits? Do those lines include test ones that you've deleted?
Yes, thank You, Ralph. Indeed, I forgot about that, as I'm usually not changing that. IMHO it's nevertheless a bad concept those removed commands are still stored inside this file. In my case, the problem was my sudo password, which I accidently typed in because sudo timeout had not yet been reached.
If I open a terminal for a new bash and enter echo 1 echo 2 echo 3 and then `history -d ...' so `history' shows `echo 2' is missing and there's a gap in the history numbering, the .bash_history written when I exit bash does *not* include the deleted `echo 2' line. So either you didn't delete your password line(s), or something else is going on and my tests above were probing what. :-) -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy
Am 11.01.19 um 11:46 schrieb Ralph Corderoy:
Hi Peter,
Does it gain new lines at the bottom as you enter commands in a terminal? Or only when the terminal exits? Do those lines include test ones that you've deleted? Yes, thank You, Ralph. Indeed, I forgot about that, as I'm usually not changing that. IMHO it's nevertheless a bad concept those removed commands are still stored inside this file. In my case, the problem was my sudo password, which I accidently typed in because sudo timeout had not yet been reached. If I open a terminal for a new bash and enter
echo 1 echo 2 echo 3
and then `history -d ...' so `history' shows `echo 2' is missing and there's a gap in the history numbering, the .bash_history written when I exit bash does *not* include the deleted `echo 2' line.
So either you didn't delete your password line(s), or something else is going on and my tests above were probing what. :-)
Hm, I guess it's because it has been saved once (by closing the tab) and later removals in newly created tabs didn't change the backup "database", or I just did something else and just cannot remember because I've been in panic (though it's my private laptop and nobody else usually has access to it, but I'll never know if there's some spy virus looking for root access, so password should never be stored anywhere in clear text). P.
On 01/11/2019 05:00 AM, Peter Nabbefeld wrote:
Hm, I guess it's because it has been saved once (by closing the tab)
If you have more than one tab open (e.g. you have several terminals open in tabs -- like you can do in konsole in KDE), then the buffering of history is handled in an application specific way (you only have one ~/.bash_history file, but you have multiple terminals open that feed information to it) When you need to modify your ~/.bash_history content, I generally close all apps that have a terminal and just use a single xterm to manipulate the history file. You can actually write your history file out to a separate text file, remove entries, and then read it back in as your history. see the -w and -r options to history in man bash. -- David C. Rankin, J.D.,P.E.
participants (3)
-
David C. Rankin
-
Peter Nabbefeld
-
Ralph Corderoy