A partir do ksh faq :
Q1. How do I get separate history files for shell?
A1. ksh uses a shared history file for all shells that use the same history file name. This means that commands entered in one window will be seen by shells in other windows. To get separate windows, the HISTFILE variable needs to be set to different name before the first history command is created.