Saturday 21 January 2012

Linux Job Scheduling Ubuntu

· Create a file test_at in your ~

o Touch test_at;

· Schedule a job that will mv this file to the /tmp directory five minutes from now and append the current date and time in it

o At now+5minutes

o At> Cat date≫~/test_at;

o At> Mv ~/test_at /tmp

o At> CTRL+D

· Create a compressed backup of your home directory on a local /backup directory, which will run at 10 am

o at 10:00am

o at> tar -Cvzf ~/baCkup/home.tar /home/nasir/

· Schedule a job as a normal user that will append the output of the uptime command to a uptime.log file in your home directory every 2 minutes on weekdays but only in the month of July

o */2 * * 6 Mon-Fri uptime >> $HOME/uptime.log

· Schedule a job as a normal user that will run a bash script called report.sh in your home directory every day exactly 23 minutes after every even hour
o 23 0/2 * * * $HOME/report.sh

0 comments:

Post a Comment

 
Free Host | lasik surgery new york