On Sunday, January 14, 2018 12:14:47 PM bw wrote: > On Sun, 14 Jan 2018, Hans wrote: > > Am Sonntag, 14. Januar 2018, 08:41:21 CET schrieb David Wright: > > Hi David, > > > > thanks for enlightening me. I always though, that "history -c" would > > clear all the history and its files as the help file says: > > > > -c clear the history list by deleting all of the entries > > > > So IMO this should delete all related history files, even bash_history. > > Shouldn't it do what it says it will do? > > It says "clear... the list" it does not say delete files. I can't answer > the question about how long it has been this way, but I'm sure it is > documented, so maybe look that up before fiing a bug about it?
I don't know if I want to comment or not. To me, it takes a fairly savvy user to recognize that list and file are not synonymous--for many casual users (including me, and I consider myself generally as something more than just a casual user), that documentation is not sufficient. At the risk of overkill, I would have written the documentation with a note to clarify exactly what I said above--something like (with a not full understanding of where / how the list is stored): "clear ... the list, but please note that there is both a list with the command history, and a file. History -c clears that list, but not the file, and when events occuur (like a new login), the history list is restored from the history file. The history file is in <wherever>, and if you want to eradicate most traces of the history file, you must also delete that file, and, potentially, if that critical, any backups. To me, if it will not be considered a bug in the implementation of the history command, it is a bug in the documentation. (Of course, I haven't gone looking for documentation on the history command, perhaps this behavior is reasonably documented. I would think it should be covered under the -h option, or maybe if several options need to discuss the existence of the history file, at least a note under the -h option something like: : see <somewhere> for discussion of the history file and the distinction between it and the history list.