LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Apparently there's some "race condition" that can wipe-out bash history if you break some kinds of loops

Posted 07-10-2019 at 01:18 PM by the dsc (linux-related notes)
Updated 07-10-2019 at 01:20 PM by the dsc

At least that's what apparently happened to me.
On Unix' stack exchange I've found this handy way of recovering it, partly at least, if you happen to have another terminal open, from before the wipe-out:

Code:
history | cut -c 8- > histback_user1.txt
The person who gave this tip suggested doing it in "every terminal", but I believe it would just overwrite it completely for whatever number of times one did it, with the simple ">." In order...
Member
Posted in Uncategorized
Views 253 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration