Hot answers tagged killall
From the man page for killall killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. When you do a kill -9, you are sending the SIGKILL signal. If you want to send a SIGKILL with killall, you need to do killall -s SIGKILL <PROCESSNAME> A good explanation of the ...
lightdm is the X display manager for Ubuntu and killing the processes will effectively disable the graphical user interface of your system. If you do not need the graphical user interface then go ahead and kill the processes but it would be preferable to stop the lightdm service instead of killing the processes with: sudo service lightdm stop ...
Note that you don't have to kill all: you can kill the specific instance: for file in *.pdf; do echo "$file" evince "$file" & sleep 20s kill $! done $! is the pid of the most recently backgrounded process. (http://www.gnu.org/software/bash/manual/bashref.html#Special-Parameters)
I think you just forgot to run evince in background: for file in *.pdf; do echo $file; evince $file &; sleep 20s; killall evince; done Notice the & after the evince command.
Only top voted, non community-wiki answers of a minimum length are eligible