[Cialug] HISTIGNORE Question

kristau kristau at gmail.com
Thu Jun 21 14:15:09 UTC 2018


Last month's CIALUG meeting was all about BASH History, but we didn't
cover the HISTIGNORE variable.

https://docs.google.com/document/d/1G7kylTTZwvlbsFOEe3Hk7WLAtuDTTqVD7X3Ql8qZcrE/edit?usp=sharing

On Wed, Jun 20, 2018 at 11:13 PM, Daniel A. Ramaley
<daniel.ramaley at drake.edu> wrote:
> There's also:
>     $ > ~/.bash_history
>     $ kill -9 $$
>
> Aka, wipe the existing history and then kill bash so it won't write out
> history on exit.
>
> On 2018-06-20 12:47, Dave Weis wrote:
>> You are fighting a losing battle.
>>
>> vi myfile.c
>> :edit /etc/shadow
>>
>>
>>
>>
>> On Wed, Jun 20, 2018 at 11:29 AM, Todd Walton <tdwalton at gmail.com> wrote:
>>
>>> It appears to me that if I set $HISTIGNORE to something like this: 'ls*',
>>> then when I enter "ls -al ~/mydirectory" at the command line it doesn't go
>>> into history. Hooray. That's the correct behavior. But this would also not
>>> go into history: "ls -al ~/mydirectory; vim /etc/passwd; echo ha ha
>>> suckers".
>>>
>>> That seems like a bad design. I wouldn't expect bash history to be made to
>>> resist manipulation by a person-of-ill-intent. That's out of scope for
>>> that. But even a legitimate user could accidentally preface a command
>>> they'd like to keep with a command they don't care about, overlooking the
>>> fact that it would prevent the command they'd like to keep from going into
>>> history.
>>>
>>> Can HISTIGNORE be written to prevent that situation?
>>>
>>> --
>>> Todd, off to experiment
>>> _______________________________________________
>>> Cialug mailing list
>>> Cialug at cialug.org
>>> http://cialug.org/mailman/listinfo/cialug
>>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>
> __
> Daniel Ramaley | Server Engineer 2
> Information Technology Services | Drake University
> T: +1-515-271-4540
> W: http://www.drake.edu/its
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



-- 
Tired programmer
Coding late into the night
The core dump follows


More information about the Cialug mailing list