Wednesday, January 25, 2012

Scheduling a regular job in Linux

To execute the shell script myjob.sh every Friday and Saturday of July at 0,20 and 40 minutes past 10pm, do
crontab -e 
In the editor that opens up, enter
0,20,40 22-23 * 7 fri-sat /absolute/path/to/myjob.sh 
and save. You are done!
The format is for specifying jobs is
Min Hour DoM MoY DoW Cmd.
See Ian's article for more.

Monday, January 23, 2012

Reading ISO files in Linux

Given the file
/path/to/iso/abc.iso
do
mkdir /path/to/mount/dir/abcdir
mount -o loop /path/to/iso/abc.iso /path/to/mount/dir/abcdir
cd /path/to/mount/dir/abcdir
You can now start using the contents of the ISO file.