[NTLUG:Discuss] HOW? bash shell shortcut using history |grep

MadHat madhat at unspecific.com
Thu Jun 7 11:53:55 CDT 2001


At 08:46 AM 6/7/2001 -0500, you wrote:
>Something that has always puzzled me about the shell history
>file:   If a user is logged in on multiple tty's, does the
>users history from all sessions go into the same file?  This
>could be a real problem if I do a !r hoping to envoke rpm but
>someone else using the same login just did an rm -rf *

yes and no on the history file...  yes it using the same history file, but 
it is written to after log out, so if you log in on one tty, that history 
is read from the file and held and modified in memory (I believe, it might 
be a tmp file).  The second tty you connect with will ready the same file 
and have the same history as the first, until a command is run.  if one 
logs out, their updated history is written back to the history file, but I 
am not sure if it uses the history it has in memory, or if it just adds on 
to the end...  haven't looked... now I need to go look that up, or it will 
bother me for days.  I'll get back to you, unless someone else knows already.


>George
>_______________________________________________
>http://www.ntlug.org/mailman/listinfo/discuss

--
MadHat at unspecific.com

"Focus on the packet.  It's better that way."
                                              -tb




More information about the Discuss mailing list