History file for dialog C shell (t)csh

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Sun Apr 20 18:08:58 UTC 2014


On Sun, 20 Apr 2014 19:40+0200, Polytropon wrote:

> I have a question regarding shell history when running several
> shell instances. The C shell (still) is my primary interactive
> shell. It stores commands in ~/.history. But as I'm using more
> than one shell instance (in fact, 5+ shells is the norm here,
> called inside X terminals), I find that the history file only
> contains commands from one of those shells, even though the history
> of each indivual shell can recall previous commands. At the end,
> only one shell's commands are stored in the history file, so
> after a reboot for example, all shells have _that_ specific
> history.
> 
> My question sounds stupid, even to me: Is there a way to have
> individual shell history files for each shell instance? I don't
> even have an idea of how to make the association shell<->history
> for later re-identification... it already sounds confusing...
> 
> Or on the other hand, is it possible to have all shells send
> their history to a common history file?
> 
> Or should I simply switch over to a different shell? ;-)

Could this be what you need?

set history = 200000
set savehist = (200000 merge)

It saves the 200,000 last commands, and merges the new commands with 
the previously saved ones.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-questions mailing list