Sunday, February 19, 2012

[TIP] Use Linux Pipelines and Make your life easier

Suppose you want to get the history of your terminal (commands, that you have typed  in the terminal) and find out a command that you have used log time ago.

So you can simply use history command to list down command history and find it.

$ history

( By default Linux store only last 1000 history of your command line. you can find the history file and size of history by typing following command. you can change these values changing global profile value of the terminal. )

$ echo $HISTFILE 
$ echo $HISTSIZE

But if your list is bigger one you may need to do a search to find your command. 
for example you can use grep command to find it. See following command set.

$ history > history.txt 
$ grep -i "dpkg" history.txt
 1761  dpkg -s jflex
 1974  dpkg -s cup
$ rm history.txt

In first command it writes history into a text file. In the second line, it search for "dpkg" with ignoring the case in the history.txt and it shows the results in next two lines. After that in the 5th line it removes the history.txt file.

But we can do this easily using Linux pipelines. It generates no intermediate files and can obtain result using one line. here is the command.

$ history | grep -i "dpkg" 
 1761  dpkg -s jflex
 1974  dpkg -s cup 

This is a simple example that use Linux pipelines. You can use this for very complex stuffs.  Read this Wikipedia page to learn more on Linux pipelines.

Here is another example that use pipeline.

$ find . -name .svn | xargs rm -fr

this command removes all .svn directories in current path.( Also you can use non pipeline solution to do this. see following command )

find . -name .svn -exec rm -rf {} \;

Wednesday, February 15, 2012

HUAWEI Mobile Broadband dongle not working on Ubuntu ? Try Mobile partner on Ubuntu

Today I noticed that, I can’t connect to the Internet using my HUAWEI E153 dongle on Ubuntu 11.10. (In the afternoon, it was working well on Ubuntu). 

In Network connection menu in the Notification area, it shows my mobile connection plan (Which I configured earlier; that means my dongle was detected by Ubuntu), but when I select it, it didn't connect to the Internet. 
I tried it several times and tried several things( unplugged and-replugged etc.) and but unable to fix it. Then I moved to my old-friend windows and googled about the problem. Observed many people have similar questions.

Mobile partner software for Linux

Most important thing which I found was “Mobile partner software for Linux”. I downloaded and installed it. (installation is very straightforward, Read readme.txt for installation instructions. )

I unplugged the dongle and re-plugged it.
 
Wow, Mobile partner application automatically stared. After few seconds it showed the signal strength at left bottom corner. Then I created a new profile (configured APN and Save) and pressed connect button. 

It connected to the Internet. At last... :)



But when you are using mobile partner even you are connected to the Internet it will be shown as you aren't connect.

Don’t forget: Now you can send SMSs and read SMS using mobile partner on Ubuntu. :) But the network statistics wasn't working properly in my system.   :(


Note:   I have updated the downloaded link.

New Download location: http://www.mediafire.com/?7a0aa7414cud40h
To old Download location: click here




  

Monday, February 13, 2012

Apache Airavata



 
 (Image Source: Apache Airavata URL:http://airavata.org/)

Apache Airavata is newly started project at The Apache Software Foundation. currently Apache Airavata is in incubation phase at The Apache Software Foundation. You can visit to the official website of the Apace Airavata at http://airavata.org/.

Apache Airavata is a software framework to build and deploy e-science projects. Airavata has the capability of composing, managing, executing and monitoring variety of distributed applications and work-flows that runs on computational resources. Concepts of service oriented computing, distributed messaging, work-flow composition and orchestration provides the foundation for Airavata. 

 Interest and Want to Involved with Airavata? Visit http://incubator.apache.org/airavata/community/get-involved.html 

Some thing you may not know about the word "Airavata"...

In South Asian culture, the word Airavata , refers to a mythological white elephant who carries the Hindu god Indra. Also means meaning "elephant of the clouds". (Reference: Wikipedia http://en.wikipedia.org/wiki/Airavata) 


I hope to post some more about Apache Airavata in my next blog posts.