You are on page 1of 1

ps - ps

ps -ef - ps -ef
at - at 12:30:10 ls
sleep - sleep 5
sleep 10
nice - nice -20 ls-l
nice +9 ls-l
nohup - nohup sh sample
kill - kill pid
killall
daemon process
execlp("/bin/date", "date" , "options",NULL)
crontab
restriction
---------------
only if name appears in usr/lib/cron/cron.allow
(or) the name should not appear in the file usr/lib/cron/cron.deny
(or) only the root user can use the crontab
Crontab Commands
----------------------------
crontab -e - edit the crontab file
crontab -l - display the crontab file
crontab -r - Remove your crontab file
crontab -v - displays the last time you edited the file
syntax
* * * * * command to be executed
*5 - day of week (0-6)
*4 - month(1-12)
*3 - day of the month(1-31)
*2 - hour(0-23)
*1 - min(0-59)
eg:
30 18 * * * rm /home/someuser/tmp/*
59 11 * * 1-5 root backup.sh
to check if cron is running
$ ps|grep crond
to start the cron
# crond -- from the root

You might also like