If it's the last command you ran, hitting the up arrow will cause it to reappear after you open Terminal.This is a good thread. Everyone should know the sudo purge trick.
I'm glad it's a short command and easy to remember.
Fortunately, Terminal supports Copy and Paste. Except for the shortest, I never remember and typing is a time waster, especially since a missed mark, space or incorrect capital can cause a command to fail. killall Finder is a good example—try it with a lower case 'f' and you will see that nothing happens.Those long terminal commands scare me like I'm gonna toast the whole system with one letter out of place.
I keep and update a .txt document called Terminal Commands OS X with an alias to it on my desktop. In it, I also include directions for dealing with ACL Not Found, emergency boot and many arcane system commands that have become useful over the years.
To me, these are the essentials:
Memory purge: sudo purge
Re-launch Finder: killall Finder This is way cool. It relaunches the Finder in a few seconds without the time or issues caused by Force Quit. Allows certain tasks to take effect without rebooting and does not interrupt a Time Machine backup.
Enable Trim: sudo trimforce enable OS 10.10.4 and later if booting from a non-Apple SSD
Repair Permissions (OS 10.11 and Later): sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /
Show Hidden Files: defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Re-hide hidden files: defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
sudo commands require your admin password every 5 minutes.