Dream cautiously!

11 Oct 2008 In: Daily Life

Dream cautiously! Your future to be is what you dream now.

Follow your heart and pursue your dreams: that makes you feel proud of yourself and happy

And this happiness is the reason for life.

-me

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Reddit
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Slashdot
  • TwitThis
  • E-mail this story to a friend!

A simple backup script

6 May 2008 In: Linux, Web2.0

The other day, I wrote this bash script; I thought it would be good to share it with others too, may save someone time or help somebody. I usually use it at the end of day to create a backup of the software package I developed during the day. Just run it with the directory address you’d like to create backup of as input and in a glimpse the backup tar.gz file will be ready at ~/backups/. Later, for more assurance you may upload your backups to an online repository site like box.net or filedropper.com.

The backup.sh script is:

#!/bin/bash          

SRCD=$1
TGTD=~/backups/

BASENAME=$(echo $1|rev|awk -F \/ ‘{print $1}’|rev)
if [ -z $BASENAME]; then
	BASENAME=$(echo $1|rev|awk -F \/ ‘{print $2}’|rev)
fi
OF=$BASENAME-$(date +%Y%m%d).tgz

tar -cZf $TGTD$OF $SRCD

Nothing special, just a simple backup script; Have a good day.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Reddit
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Slashdot
  • TwitThis
  • E-mail this story to a friend!

Hi, long time no see.

After one month of busy time, last night I found some free time to upgrade Cube’s and Mokaab’s Wordpress and reopen the blogs. To be honest, the reason why I set them down is not because of Wordpress which was out of date, but yet I prefer not to describe it here. Those who are closer to me may know.

Anyway, about the good news, long story short, “we” also launched two child project:

Ok, take care, catch up with you later.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Reddit
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Slashdot
  • TwitThis
  • E-mail this story to a friend!

About this blog

In this blog (a.k.a Cube) I’m going to freely talk about almost everything I happen to face in my daily life. As I’m in the field of Computer science and IT, my posts are more likely to be about computers, Web2.0, IT and open source applications.
Thank you for visiting and don't forget to subscribe for Cube blog feeds.

Flickr PhotoStream

    Woodlands Strelitzia Pink Bougainvillea Blossom Blossom After the rain Playground behing my apt block Green Pass Full Moon Raise Sunset at Singapore Botanical Garden Singapore Marina Bay Vertical Sky Line

Feed

feed

Archives

I Support

Firefox 3
Link to Linux.org
Help end world hunger
Link to the Spread Open Media project
دانلود نرم افزار
Balatarin

Email Subscription

Listen to cube

Cube stats

hit counters