On Tue, Apr 10, 2012 at 02:50:06AM +0200, Frantisek Hanzlik wrote:
suvayu ali wrote:
Hi Frantisek,
On Sat, Mar 24, 2012 at 15:15, Frantisek Hanzlik franta@hanzlici.cz wrote:
Now occurred to me that i can watch several (mainly roots) history files by incrond and start some script which log some events on it. Maybe it helps.
I recalled your post and did a check before I rebooted my laptop today (after 7 days). I think you were correct and my claim that its a ridiculous idea was wrong.
This is what I did:
- I closed all running apps except for a terminal.
- Executed these commands $ echo "1 test" $ echo "2 test" $ echo "3 test" $ sudo shutdown -P now
- On turning on the laptop again, I could not find either of the three commands with history | grep -E "echo.+test"
In addition to $HISTFILE, I log all my history to a separate file. That file _did_ have all the test and the shutdown commands. So we can conclude bash was doing the right thing and systemctl is to blame.
At the moment I am very busy, so I would urge you to file a bug report. If you post the bug id back to the list, I'll try to add more comments if I find anything with regards to this.
Hello Suvayu,
I now had a bit time for some testing, and hopefuly was able induce situation when history is always (strictly speaking, 6x in 6 tests) lost. Please see bugreport:
Please ensure your $HISTIGNORE environment variable is not set. It shouldn't be set by default, but better check anyway. ;)
Terry