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.
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:
Flishr: A desktop (PC) application which is a Flickr friend that helps Flickr users to batch upload their photos to Flickr, manage their tags and sets, search faster in Flickr, browse most interesting photos and download those favorite pictures (of course if the photographer granted the download rights). And also you can see who “we” refer to here.
PicArtia: Is a Web2.0 startup which enables you to create your own photo mosaic fast and easy, in just three simple steps. The point that makes PicArtia outstanding is the fast algorithm which is used to create mosaics. Again you can see who “we” refre to here.Ok, take care, catch up with you later.
God! grant me the serenity to accept the things I cannot change, The courage to change the things I can and The wisdom to know the difference.
First: I was thinking the other day, that I can classify my friends into four groups according to the sentences they use in their daily conversations:
And I, myself fall into the first group
Second: I’m marking undergraduate student lab reports for data structures course; 46 set to be marked and I have still 36 more to go. I guess now I’m passing from the 1st box to the 2nd box according to this fabulous comic:
Update: It took me about 15 hours to mark them all and type the results in the forms and print them and.. I was awake last night and now, I’m dying of sleep, but! I have to stay awake! because I have 4 hours lab supervision this morning…
Welcome to Cube.
Happy Chinese New Year! It was quite a while that I planed to start my own blog, yeah, and finally today I made that plan. Today is the first day of year according to the Chinese calendar. This year is the rat’s year and I’m a rat too! What a nice coincidence.
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.