Browsing articles tagged with " bash"
Apr
30
2012

Automating backups using rsync, bash and cron

Rsync it  is a command line program for Linux that performs a backups. Bash is a scripting language for Linux that allows you to automate the commands you run in the command line. And Cron is a Linux program that schedules programs to run, based on time. You can see the potential for these three programs to work together to provide automated backups!I wanted to backup my home directory using rsync to a separate drive, […]

Apr
30
2012

Linux’s bash shell script – Check running program

Since I have develop a script code to do automatic synchronize files between server and clients. The code is designed to run in background. To make sure that the program is still running the following code is used to recognize the running process. #!/bin/sh SERVICE=’httpd’ if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo “$SERVICE service running, everything is fine” else echo “$SERVICE is not running” echo “$SERVICE is not […]




Member Area