При работе в консоли и использовании screen бывают проблемы с историей введенных команд.
В инете нашел следующее решение.
Добавляет команды сразу после использования. Убирает дубли. Увеличивает размер файла. Добавляем в файл «.bashrc»
shopt -s histappend PROMPT_COMMAND='history -a' export HISTIGNORE="&:ls:[bf]g:exit" shopt -s cmdhist export HISTFILESIZE=3000 |
В одной из ubuntu по умолчанию было так.
# don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=2000 HISTFILESIZE=4000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize |
Еще можно было бы раскладывать историю по файлам в зависимости от screen сессии или имени задаваемого через параметр -S