Understanding and controlling your bash history

preview_player
Показать описание
A quick tour of the bash history and how to use and control it. First we use the simple history expansion using the band or ! character. This feature can be turned off by disabling the histexpand shell option. We turn it on with set -o histexpand. We ensure that we keep uniqueness in our history file with the HISTCONTROL variable set to erasedups, but most useful, we look at ctrl + r
Рекомендации по теме
Комментарии
Автор

Hello - export HISTCONTROL='erasedups' - Does not save for me. In other words, when I run this program it works and will trim my bash history about to about 240 lines. However when I exit linux and then SSH back into it again, it is back up to 900 + lines. What is happening?

lvscan
Автор

Very cool video, is there a way preventing users from deleting their command type history ?

MrDjegsi