Archive for the ‘knoppix’ Category
tar
I often use tar command for my backups. Its a little crazy, but I checkin my code into my svn, tar the repository to my usb disk and my gmail/eemail! You see, it is very tough to get back all that code I’ve written now as part of my MS, from scratch. In spite of using tar for so long, I made a simple mistake last week that left us wondering if we forgot the command.
The scenario is this : We needed a script that will backup all the “dot rc” files in the home directory onto a mounted usb disk. We did not want to backup any mozilla/firefox/iceweasel preferences. It was simple and I came up with a script and built it into the live CD we have customized for our labs. It seemed to work until someone closely noticed that it was not only backing up .mozilla and .netscape, but also ../knoppix and ./.mozilla . Get what I mean? The command is this
For seasoned linuxers, the mistake may be obvious. It wasn’t so much to me! Playing hard with –exclude patterns only gave us more frustrations. I did “man tar” a dozen times, never noticed any differences. Today morning, I got a small idea (funny calling it that). I tried shuffling the order of arguments a bit and bingo! Here is the command that worked.
tar -czvf ${LOCATION}/dotrcs.tgz ${HOME}/.* --exclude=".mozilla" --exclude=".." --exclude=".netscape"
tar -czvf ${LOCATION}/dotrcs.tgz --exclude=".mozilla" --exclude=".." --exclude=".netscape" ${HOME}/.*
Simple ain’t it? Actually, in retrospect, I feel stupid. The error all the time been “–exclude=”.mozilla” : no such file or directory”. A very vital clue there and yet wasted quite a bit of time checking nowhere!
Blogged with Flock
Remastering Knoppix
Remastering a distro is not any unheard of topic today. And especially remastering Knoppix with all that brillian step-to-step documentation, it is just about having some interest and time to try one. Last week I just had the right mix of things and I got the first remastered version. The idea was to cut down on the multimedia and the jazzy kewl apps and add some electronics stuff from opensource, some computation tools like octave, numeric-python and all that. Well, came around well I should say. Only wouldn’t fit a CD yet. I remember reading this in one of the early linux for you magazines about how the remastering quickly becomes a balancing act?! I still have some act left for the week ahead. I wonder if there is something left to be stripped at all! Anyways, If it ain’t getting smaller, I just might choose a bigger disc. Do they call these DVDs?