Archive for June, 2006|Monthly archive page
http://skp.co.in
I have a home now,
Web :: http://skp.co.in
Mail :: skp (at) skp (dot) co (dot) in
PS 1 :: Thanks to smr for the help.
PS 2 :: del.icio.us is bad with that feature of manually setting the sharing of each imported link X-(
PS 3 :: Wont be able to go home in July
(
PS 4 :: Thats it !!
rm -rf *
is a no no ….
In last 1 month of time, I have got two reports of semi (thank almighty, they remembered Ctrl+c ) rm -rf *. The first victim was Pondey, with all the patience/frustration he was working under the Sharp Teeth if u know wat I mean, deleted some files just before he was supposed to submit the FYP. Poor chap had to rewrite the whole thing giving away one of the niteouts totally to the work (although u can recode faster the same thing you did last nite, it not reasonable enuf to delete it ). Secondly, yesterday Aditi did something similar. Both are the cases of FYP and hence less important than any other thing
(Being sarcastic dont kill me).
Why am I saying a no no to using rm -rf in any situation ? Had it been the case that ext3 was not invented / extended / defined there was not much problem deleting stuff in ext2 and recovering, it will be almost unbelievable to see ur deleted files recovered completely ( with a couple of bonus files) by any ext2 recovery tool on the net.
You can read some frustrating experiences here and here.
Cause ::
“Unlike ext2, ext3 zeroes out the block pointers in the inodes of deleted files. Because this removes all metadata for the affected files, the files cannot be recovered directly. The user’s only recourse is to grep the hard drive for data known to signal the start and end of the file. This provides slightly more secure deletion than ext2, which can be either an advantage or a disadvantage.”
“In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas ext2 just marks these blocks as unused in the block bitmaps and marks he inode as ‘deleted’ and leaves the block pointers alone. Your only hope is to ‘grep’ for parts of your files that have been deleted and hope for the best.”
Only Hope ::
grep the hard disk (Next to Useless … just recode yeah yeah I know its the code u delete, movies songs can be recopied)
You can use grep command, for example if you want to undelete a text file with 100 lines starting with “top secret ” which was stored on /dev/hdc2 you can try:
# grep -a -B2 -A100 “top secret” /dev/hdc2 > /tmp/recovered.txt
-a : Process a binary file as if it were text
-B N: Print N lines of leading context before matching lines
-A N: Print N lines aka recover 100 lines of trailing context after matching lines
Few FAQs from a LUG site::
block and an i-node ::
Block can be taken as minimum disk space that can be allocated to a file. For example if block size is 1KB then even if file is 512 bytes it will be allocated one block that is 1KB of disk space (rest 512 free). Block size can be different on different system. With mke2fs command and -b switch you can specify the block sizee for your filesystem. I-node is a number attached to your file or your directory. Actually, the GNU/Linux system doesnot understand the name that your assign to your files; rather it assigns its own I-node numbers to the files that helps the system detect their properties and physical location.
diff ext2 ext3 ::
Ext3 filesystem is essentially an ext2 filesystem except for the fact that Ext3 supports journaling for ext2. Ext3 has been structurally implemented same as ext2, i.e. The data structures are the same. This implies that a cleanly umounted Ext3 filesystem can be successfully mounted as ext2 filesystem and an ext2 filesystem can be successfully mounted as ext3 if it is journalled.
What is journalling ?
In earlier days (ext2), a sudden power failure or another such condition could leave the filesystem in an inconsistent state. So after every boot the fsck program was run for every uncleanly unmounted filesystem. This took very long. Ext3 avoids this time consuming task by letting check only the specific areas that were recently accessed or modified. For this a log is kept which is called �Journal�. This way filesystem checking time is drastically reduced.
Converting an existing ext2 to ext3 ::
You can perform the following steps to achive this:
#sync // Synchronize your hard drive.
#tune2fs -j -c 0 -i 0 /dev/
Open the /etc/fstab file and chage ext2 to ext3 in your partition’s line.
#tune2fs -l /dev/
#umount
#mount
#df -T
#mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r)
The last command is to be run if this partition is the first partition. It is needed so that initial ramdisk contains needed ext3 and jbd kernel modules required for ext3 filesystem.
PS :: Be Careful. You know how hard it is to code in todays world with DC++ / WorldCup going on / Wireless LAN gaming
adios
skp
Google Finds Me :: Thnks Google
Hello there,
Before going to bed I just did a regular activiy of looking at the page hits to the blog ( which is getting worse
) and to the terms looked up on google which resulted into my blog. Following are some words which made me smile at 6 in the morning just before going for a nap. Although there are many other links but the following stand out as mentioned against them ::
Bandiyan :: Hindi word for Girls
Hit #1
"poem on friendship" :: Didnt expect this one just becos its such a common phrase _Poem on Friendship_ Hit #1
chat skp :: Any three letter word wil mostly result in a Companies Share Symbol and thats why it will be much harder to mark a identity on the web with _skp_ and wont be as simple as _suryakant_. For time being this is the closest Hit #2
just not lovable :: Not so proud about this one, its just a category on my blog named _not_lovable_ but neways Hit #1
wulfur ubuntu :: Some geeky stuff but still Hit #1
dc++ wulfur uninstall :: The only hit for this one
There are many more, but sometime later…
Also the post in making :: The X Effect :: may be will finish today
adios
skp
My New Desktop :D
Change Rocks :: So here I go after having a Black theme for last 1 month I changed to this today morning…
GnOmE RoCkS.
adios skp
Comments (7)
Comments (4)
Leave a Comment
