Occasionally, my terminal becomes slow because I’m running out of memory. What I usually do close the most memory consuming tasks from the Mac OS X’s Activity Monitor.
This time though, my terminal has become ridiculously slow without my system memory nor CPU maxing out. I resisted fixing it because I was still working but I finally got fed up when it starting taking 5-10 seconds after each new shell session/tab.
Luckily, I wasn’t the only one who experienced the same thing in the past.
As OSX Daily points out,
the terminal looks for *.asl (Apple System Log) files from
The short term solution is to delete those files from time to time.
You can also do this in a one-liner command, but a little exercise of caution wouldn’t hurt. You don’t want to accidentally autocomplete into different directory and delete files that you really don’t want to delete!
Remember: always be on guard whenever you do something destructive in your terminal.