MacOS – Strange output at end of terminal session in OS X El Capitan

macosterminal

Yesterday, I upgraded my MacBook Air from Yosemite to El Capitan.

I am getting strange output at end of terminal session after upgrade.

Last login: Mon Nov 8 11:12:50 on ttys000

My-MacBook-Air:~ user$ exit
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Anyone getting similar output? Is this some kind of virus? or it is OS feature?

Best Answer

Terminal saves a bunch of history so that when you open it again, it all looks like it did when you quit it. The messages you are seeing reflect that saving of data. You can see exactly what it is doing by taking a peek inside /etc/bashrc_Apple_Terminal:

grep "truncating history files" /etc/* 2> /dev/null /etc/bashrc_Apple_Terminal: echo -n 'truncating history files...'