How to remove blank empty lines in unix/linux

Posted on March 10, 2010 - Filed Under Linux | Leave a Comment

I found 6 ways can do it,if you know others ,pls let us know.
Please see below code for detail.

bash-2.05a$ cat test.txt
aaaaaaa
 
bbbbbb
 
cccccc
bash-2.05a$ grep ‘.’ test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$ grep -v ‘^$’ test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$ sed ‘/^$/d’ test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$ sed -n ‘/^$/!p’ test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$ awk ‘/./’ test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$ awk NF test.txt
aaaaaaa
bbbbbb
cccccc
bash-2.05a$

Read More..>>

How to fix keyboard mapping issue of Gnome / Vnc in ubuntu

Posted on June 18, 2009 - Filed Under Linux | 5 Comments

Yesterday I just intalled an ubuntu 9.04 Server for my co-work.After installed VNC on this server I found the keyboard was messed up while I am connecting this server via vnc client from Windows.After search from internet I found there are 2 good solutions to fix this isssue.
1.In the terminal of this server ,type the [...]

Read More..>>

To install graphics drivers on Ubuntu

Posted on April 10, 2009 - Filed Under Linux | 4 Comments

If you do not know whether graphics drivers been installed or not,type following in a terminal window ,and it will tell you

and to find out the name of your graphics card,type code:

1.TO install graphics drivers
If it is Nvidia type:

For ATI card :

press enter to install
At last restart your computer
2.Another way,go to System–>Administration–>Hardware Drivers(or Restricted Drivers [...]

Read More..>>

3D Desktop switch on Ubuntu

Posted on April 10, 2009 - Filed Under Linux | Leave a Comment

First,you need to install “3ddesktop” by typing the following in a terminal window:

press enter
then you can type 3ddesk ,press enter to run this after the installation
You will see:

And use the up and down or right and left arrow keys to change desktop,press enter to select that desktop
Tips:
You must make sure you have installed graphics drivers [...]

Read More..>>

How to use single click instead of double click in Ubuntu

Posted on April 6, 2009 - Filed Under Linux | Leave a Comment

For single click,first open up the file browser . Open up trash,or start as shown in figure .

Then go to Edit–>Preferences

Open the “Behaviour” tab in the next window,then set to single click

Read More..>>

How to install .deb packages in ubuntu

Posted on January 14, 2009 - Filed Under Linux | Leave a Comment

The .deb packages are packages that are often used in Ubuntu. You can install any .deb package onyour ubuntu. .deb files can generally be installed from the file manager (Nautilus) merely by clicking on them, since file associations with the default installer is already been set in Ubuntu. Below instructions are for those who wish [...]

Read More..>>

Get distribution-specific information of your ubuntu

Posted on January 14, 2009 - Filed Under Linux | Leave a Comment

The lsb_release command provides certain LSB (Linux Standard Base) and distribution-specific information.

lsb_release -a

Below is an example of the output of command lsb_release

keeper@sdclx2:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

Read More..>>

Install compiz fusion and enable cube atlantis effect on ubuntu

Posted on January 2, 2009 - Filed Under Linux | 1 Comment

Compiz Fusion is the result of a merge between the well-known Beryl composite window manager and Compiz Extras, a community set of improvements to the Compiz composite window manager.
If you still have not an ubuntu yet,you can refer guide The simplest way to install ubuntu 8.10 to install it on your PC.It’s very easy,just need [...]

Read More..>>

Install Nvidia or Ati driver for your ubuntu using EnvyNG

Posted on December 30, 2008 - Filed Under Linux | 1 Comment

EnvyNG is a simple tool which you can use to install Video driver for your ubuntu.You can use text mode to install driver directly.Also you can use the EnvyNG GUI to install video driver more easy.
1.Install driver using EnvyNG text mode.Start EnvyNG by input command “envyng -t”.

envyng -t

2.In the EnvyNG window,select which driver you need [...]

Read More..>>

The simplest way to install ubuntu 8.10

Posted on December 29, 2008 - Filed Under Linux | 1 Comment

Wubi,yes,the simplest way to install ubuntu is to use wubi.Wubi is an officially supported Ubuntu installer for Windows users which can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a safe and simple way.
Ok,Let’s start here!
1.Download wubi and ubuntu [...]

Read More..>>

keep looking »