It’s worth remembering what ^Z can do for you.

DOS/Windows users using the Terminal/shell normally find out about the joys of ^Z pretty quickly. ^S can be a real doozy too but it seems that it’s been removed on the Apple Mac for safety.

^Z as you will find stops the app. You commonly find that out when trying to create a file using cat, like copy con file you can do cat > file on *nix but instead of ^Z for an end file *nix uses ^D. In order to get back to the file and be able to press ^D you just need to run fg. That brings the stopped app back to the foreground.

Now that you have found out how to stop an app mid flow there are all sorts of possibilities. You could kill it for example. The other thing is to send it to the background. If you forgot to append the & you can simply stop it then run the bg command to put it in the background.

On Linux ^S sends the application to sleep. It then doesn’t respond to any key presses. At least until you hit ^Q to wake it up. That was one that took me a while to figure out. Having to kill vim when you meant to save the changes did demonstrate its recovery procedure quite nicely though, and I never did lose any work!

Leave a Comment