cám ơn mọi ngườiThe Mac OS X Terminal can become slow to launch over time, but there’s an easy solution to speed it up again. By deleting the Apple System Logs, you can shave the lag in opening and launching new Terminal windows/tabs dramatically, in my case from about a three second delay to instantaneous!
Here’s how to delete the log files and gain your Terminal launch speed back:
At the command line type the following:
then, inside that directory, type:
Warning: be absolutely certain that you only type the sudo rm -rf command INSIDE the /var/log/asl/ directory! rm -rf * deletes all files in a directory, no questions asked, so if you perform that task in the wrong directory (like home folder) you are going to have a serious problem! I’m assuming you have moderate experience in the command line environment – if you do not, you probably won’t need this tip anyway.
Update: As Marc points out in the comments, it’s safer to specify deleting only the log files. Above command has been altered to reflect this. An alternative and shorter command is this one: