clear old output in login screen?

Emiel van de Laar emiel at
Sun May 3 19:53:15 UTC 2009

On May 3, 2009, at 9:48 PM, gabe g wrote:

> Hey John,
>      In order to achieve this, there are two methods that I know of,
> however, they are only tested in the Bourne and Bourne Again shells.
> clear && logout                 # Bourne Again (Bash) Shell
> clear && exit                     # Bourne (sh) Shell
> You may have to try similar commands (specific for that shell) for  
> shells
> that are not Bourne-derived, but one of these two commands should  
> almost
> always work.


zsh has ".zlogout" which gets read/executed when the shell exits. I  
have the
following setup:

~ % cat ~/.zlogout

Perhaps other shells have a similar feature.


  - Emiel

More information about the freebsd-questions mailing list