How to remove blank empty lines in unix/linux
Posted on March 10, 2010
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$
Popularity: 1% [?]
» Filed Under Linux | Leave a Comment
How to remove email account from T-Mobile G1 Google Phone
Posted on July 27, 2009
If you don’t need the email account in your T-mobile G1 phone,you can remove it easily follow the following steps
1. On the Home screen, press the Application button.
2. Touch Email and go your Inbox
3. Then press Menu and select Accounts
4. Tap and hold the account which you want to remove.
5. Select Remove account.
6. Select OK. Done,Good lucks.
Popularity: 21% [?]
» Filed Under Other | Leave a Comment
How to fix keyboard mapping issue of Gnome / Vnc in ubuntu
Posted on June 18, 2009
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 following command ,then kill your old vnc then create a new one
gconftool –set /desktop/gnome/peripherals/keyboard/kbd/layouts –type List –list-type String [aa]
2.Another way is to edit your xstartup file and add 1 new line “export XKL_XMODMAP_DISABLE=1″ (location is $HOME/.vnc/xstartup) then re-create a new vnc session.Below is an example.
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
Note:Please add this line before line “/etc/X11/Xsession”
tip
Popularity: 35% [?]
» Filed Under Linux | 13 Comments
How to relocate user profile folder to other drive in windows 7
Posted on May 20, 2009
Bydefault,windows 7/vista put all system data and user data on the same partition,normally it’s drive C.Under this condition we must backup our user data every time we re-install our windows 7/vista.From windows vista ,Microsoft supply us a tool mklink which can create a symbolic link under windows 7 or vista just as the command ln under unix/linux.Below is an example about how to put user data on non-system using mklink in windows 7.
1.Enable administrator account and set a password for it.You can refer How to enable or disable administrator account in windows 7
2.Logoff and login with administrator account
3.Relocate your user data to other non-system partion,for example from C:\users\J to D:\users\J
4.Use mklink to create a symbolic link from C:\users\J to D:\users\J
mklink /D C:\Users\J D:\users\J
5.Re-login use your own account,you will find nothing changed,but in fact your physical user data is on drive D.
6.Done.The next time you re-install your OS ,just use the same user name, remove C:\users\J then run the command of step 3 again then your user data is back.
source:How to move user data folder to non-system partition in windows 7/vista
Popularity: 100% [?]
» Filed Under Windows | 17 Comments
How to show the tab bar when you start firefox
Posted on April 16, 2009
Today I found my firefox do not show the tab bar by default when I start the firefox.In fact it’s very easy to enable this.
To let firefox show the tab bar for you,just go to Tools—Options:

Then select Always show the tab bar,After click OK,you will find Firefox show your the tab bar.

Popularity: 7% [?]
» Filed Under Firefox | Leave a Comment
To install graphics drivers on Ubuntu
Posted on April 10, 2009
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 Manager for different release)

select at the next window and then click “active”


Popularity: 18% [?]
» Filed Under Linux | 5 Comments
3D Desktop switch on Ubuntu
Posted on April 10, 2009
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 before running 3ddesk,and I will do with it in “TO install graphics drivers on Ubuntu”
thanks for reading
Popularity: 8% [?]
» Filed Under Linux | Leave a Comment
How to use single click instead of double click in Ubuntu
Posted on April 6, 2009
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

Popularity: 8% [?]
» Filed Under Linux | 1 Comment
How to play mkv files in windows xp or vista
Posted on April 1, 2009
The MKV file isn’t the regular video and audio compression format. The MKV is an open source container format. It is a general-purpose audio and video container and a contending format to the more popular AVI and MP4 formats. Below will give you 2 methods on how to play mkv files in windows.
The first way is use VLC player to play mkv files in windows,and this is also the easiest way because you only need to install VLC player on your computer then you can play mkv files in your computer.You can download VLC player from VLC’s website.
The second way to play mkv files in windows is to use Media Player Classic (MPC), However, there is a problem (isn’t there always?), the parser is out-dated in the latest version of MPC.So I suggest you to disable the internal matroska parser in Media Player Classic.To do this ,just click View –> Options. Select Internal Filters on the left as shown above and disable Matroska under source filters ,then click OK.

Now you can play mkv files in windows now,good lucks!
Popularity: 18% [?]
» Filed Under Windows | 2 Comments
How to know your computer’s uptime in Windows xp/vista/7
Posted on April 1, 2009
As you know,we can use command “uptime” to show your computers uptime in linux/unix.Also we may want to know the uptime of our computers in Windows ,but there is not the uptime command in windows.
Fortunately,windows also give us related commands to show the uptime of the computer.You can find the uptime in the output of command systeminfo,also can find it in the output of command net statistics server or net statistics workstation.Below the the examples:
Command net statistics server or net statistics workstation
C:\Documents and Settings\Viking>net statistics server Server Statistics for \\J Statistics since 2009/4/1 PM 07:55 Sessions accepted 1 Sessions timed-out 0 Sessions errored-out 0 Kilobytes sent 0 Kilobytes received 0 Mean response time (msec) 0 System errors 0 Permission violations 0 Password violations 0 Files accessed 0 Communication devices accessed 0 Print jobs spooled 0 Times buffers exhausted Big buffers 0 Request buffers 0 The command completed successfully.
Command systeminfo | find “Up Time”
C:\Documents and Settings\Viking>systeminfo |find "Up Time" System Up Time: 0 Days, 1 Hours, 10 Minutes, 9 Seconds

Popularity: 18% [?]
» Filed Under Windows | 5 Comments