Mukesh Chauhan

Just another WordPress.com weblog

Turn Windows NOTEPAD into a dairy

Here is a real cool tip to write down any info on a day to day basis…

It simply serves as a virtual diary!
* Open a notepad and type .LOG (case sensitive) as the first line.
* Save and close the file.
* Double-click the file to open it and notice that Notepad appends the current date
And time and places the cursor on the next line.
* Type your notes and then save and close the file.

Each time you open the file, Notepad repeats the process,
Appending the time and date and placing the cursor below it.

March 16, 2009 Posted by | Other | 4 Comments

Creating alias in bash

You can alias any command in your .bashrc file to create shortcut.

For ex – alias l=’ls -ltr’ will create a alias for ls command with -ltr options. Now use only l to invoke this command.

Combine two or more commands in one alias,

alias cdh=”cd <home>; ls -l”

You can see aliases set by you by invoking ‘alias’ command in shell.

A more complex example for creating a shortcut,

rmdir()
{
rm -rf  $1 > /dev/null &
}

$> rmdir test will remove test directory.

March 6, 2009 Posted by | Linux | Leave a comment