Tag Info

Hot answers tagged

4

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 ...


2

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)


1

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