[Cialug] HISTIGNORE Question

Daniel A. Ramaley daniel.ramaley at drake.edu
Thu Jun 21 04:13:25 UTC 2018


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


More information about the Cialug mailing list