helpThe GNU Bourne-Again SHell - Support: sr #108530, History duplicates with multiple...

 
 

sr #108530: History duplicates with multiple sessions

Submitted by:  Balaco <balacobaco>
Submitted on:  Thu 13 Mar 2014 08:14:09 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 4 - ImportantStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 13 Mar 2014 08:14:09 AM UTC, original submission:

People who use history option 'erasedups' doesn't have it working in practice.

To easily make the problem happen we simply open 2 (or more) simultaneous sessions, or nested sessions (like ssh from access machine to other machines on a private network, very common).

Bash's history is kept right for an open session. When the session 1 closes it will write its history, no duplicates. But when the other session closes it won't account for duplicate commands done on the parallel session 1. Duplicates will grow very large this way.

Very bad side effect: a person choose HISTSIZE and HISTFILESIZE based on his/hers expectations. But the dups described make the practical history of different commands the person has much smaller than the desired values.

This is a very old bash issue, and simple internet searches show that people tried and try many odd things to overcome this problem. Can it be fixed and documented so we may use Bash's history in a better way?

The same problem happens when 2 nested sessions are closed abnormally, for example in a network failure.

Balaco <balacobaco>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by balacobaco (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup