Thursday, August 6, 2015

handy linux commands

run a command at a certain time use : at

$ at 12:49
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> enteryrcommandherewhatever [return]
warning: commands will be executed using /bin/sh
[ctrl-d]
at>
job x at 2006-05-01 12:49


http://www.brunolinux.com/02-The_Terminal/The_at_Command.html
http://linux.about.com/library/cmd/blcmdl1_at.htm



to kill a process by name rather than PID

kill $(pgrep name)


to run multiple processes from single line cronjob

use && for command2 to require succesful completion of command1
use ; between commands for independent commands
 
5 0 * * * command1 ; command2 ;