Friday, February 26, 2010

Suggestion for new PC or Laptop buyer

If you buy new laptop or PC, then in future you may need to format it due to various reasons such as slow speed, defragment of disk or virus. The new installation takes lots of time and also you need to install other useful software which is again time consuming task. In order to save all this, its better to first create disk image and save it. So in future whenever you need to format you can just restore this image which is very fast as compare to individual software installation.

Wednesday, February 24, 2010

How to redirect stdout and stderr output to file

Sometimes you need to redirect output of some command to file. The command may print its messages both on stdout and stderr device, in this case simply redirecting stdout to file does not help. Use following command to redirect both stdout and stderr output to file.
$ command 1 > outputfilename.txt 2 > &1

Monday, February 22, 2010

Ye Zaruri To Nahi, Jise Chahe Hum
Woh Bhi Chahe Hume.
Hum Jiski Bhi Kare Tamanna,
Woh Sab Hume Mile.

Sunday, February 21, 2010

How to access Windows Share in Linux

To access Windows share on Linux, first of all you need to install smbshare.
Then type smb://hostname_of_pc/sharedfolder
in linux explorer.
Ab Hum Na Koi Sawal Punchenge,
Aur Na Dena Padenga Tumhe Koi Jawab.
Magar Bina Sawal Punche,
Koi Kaise Kar Sakta Hai Baat.

Friday, February 19, 2010

How to format sdcard in linux for ext3

sudo fdisk /dev/sdb
sudo mkfs.ext3 -L label_name/dev/sdb

How to prevent Ubuntu from asking password for sudo

sudo visudo
username =(ALL) NOPASSWD: ALL

or edit file using
sudo visudo
and modify line
Defaults env_reset,timestamp_timeout=6000

Thursday, February 18, 2010

How to use external diff tool with Git

To use external diff tool meld with git in Linux, follow this link
http://code.google.com/p/msysgit/issues/detail?id=106

Tuesday, February 16, 2010

Dil Ke Arman, Dil hi mein rahagaye,
Humne kabhi esahar nahi kiya,
Aur woh kisi aur ke hogaye.

How to save command output of console in linux

To save output of any command printed on linux console use following command,
$ logsave filename command_name
to append to existing file
$ logsave -a filename command_name

Monday, February 15, 2010

Finally, I have created blog to post my views.