I always searched an easy way to suspend and resume processes (useful to save resources without quitting programs). First, add the following lines in your .profile
pause () { kill -SIGSTOP `pidof "$*"`;}
resume () { kill -SIGCONT `pidof "$*"`;}
then add the following shell script to your PATH
#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}"|tr '\n' ' '
and make it executable. To pause a process, from the terminal, type
pause iTunes
Remember to change the name of the process. To resume it, use
resume iTunes
Design by Simon Fletcher. Powered by Tumblr.
© Copyright 2010