Answer the question
In order to leave comments, you need to log in
When you start MC, the size of the .bash_history file is immediately reduced (past entries are deleted)
Good afternoon!
Tell me how to make friends Midnight Commander and .bash_history. If you run mc, then immediately the size of .bash_history is reduced to 8kb. All the history that did not fit into these 8kb is deleted ... That's such a horror.
How to repeat:
$ du -h .bash_history
44K .bash_history
$ mc
$ du -h .bash_history
8,0K .bash_history
export HISTCONTROL=ignoredups,ignoreboth
export HISTTIMEFORMAT="%d/%m/%y %T "
export HISTSIZE=
export HISTFILESIZE=
Answer the question
In order to leave comments, you need to log in
I'm not sure, but I don't think mc is reading .bashrc. Accordingly, if you specify a history file size in it that is larger than what mc works with, then the file will be truncated. But that's just a guess :)
Look in the system, what is the mc that is running, maybe it's a script?
I tried it myself:
$ll ~/.bash_history
-rw-------. 1 oracle cawa 42901 Sep 28 03:25 /home/cawa/.bash_history
$mc
$ll ~/.bash_history
-rw-------. 1 oracle cawa 42901 Sep 28 03:25 /home/cawa/.bash_history
System info:
$cat /etc/fedora-release
Fedora release 16 (Verne)
$bash --version
GNU bash, version 4.2.28(1)-release (i386-redhat-linux-gnu)
$mc --version
GNU Midnight Commander 4.8.3
$ file /usr/local/bin/mc
/usr/local/bin/mc: Mach-O 64-bit executable x86_64
$ du -sh .bash_history
12K .bash_history
$ /usr/local/bin/mc
$ du -sh .bash_history
8,0K .bash_history
:(
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question