Friday, July 13, 2012

Scheduled Backup of Mails in Linux

Majority Linux Users are using Thunderbird Mail Client. now if they need to take auto scheduled back up of mails just need to write the below script and set a cron job for that.

#!/bin/sh
## Script to backup Thunderbird email
## Backup needs a date (stamp)

set -x
x=`date +%d%m%y.%H%M`

## Save space by making sure backup is archived
tar zcf thunderb-mail-${x}.tgz /home/user directory/.thunderbird

## Save the compressed backup to mybackup folder
cp thunderb-mail-${x}.tgz /path to store your backup

## Clean up after, we don't need two copies of the backup
sudo rm ~/thunderb-mail-${x}.tgz



schedule mail backup,mail backup in linux,schedule mail backup in linux,scheduled backup for thunderbird,scheduled backup thunderbird linux,linux scheduled backup in thunderbird

Auto Screenshot in Linux

copy and paste below code and save the file as any name you would like with the extension .sh

#!/bin/sh

import -window root -display :0 -crop 1024x768+25+25 \
   "/path to store screenshot/$(date +%m.%d.%y_at_%H.%M.%S).png"

now move this file in /bin directory and set the scheduled task using cron. if you are using ubuntu you can use scheduled task application also.


auto screenshot,linux auto screenshot,linux screenshot,screenshot script linux,screenshot script