Posted by: fossni | November 22, 2007

how “xargs” is used?

To me, “xargs” is a useful command. Let’s see the example together. We want to search for the word “license” in all __init__.py files. My solution is like this:

find . -name __init__.py | xargs cat | grep license

Let’s analyse each command and its options:
find . -name __init__.py : First, we want to find all files match the name “__init__.py” in the current working directory (“.” is important; i.e the current working directory). You will see a list of filepaths of which __init__.py is located in the current directory and its subdirectory in Konsole.
| : This is for redirection purpose; The result that you get in Konsole, the list of filepaths, will become a parameter for other command right after “xargs” command, “cat” command, in this case.
cat : cat is used to view content of text file, __init__,py. As cat is put right after “xargs”, it will try to read all text files in the list and display continuously in Konsole;
greb license : Finally, greb is used to search all lines match the partern “license”.

That’s all from the above command line can do. Do you have other ways?

Enjoy,
da

Posted by: fossni | November 13, 2007

Sharing experience — built-in network card doesn’t work

Howdy Linux guys,

Long time no talk! I hope you’ve all been well.

Just wanna share you guys some Linux tricks.

In case yours network card is not recognized — log in as root and type
ifconfig; then you cannot find your ethernet card (eth0). One solution should
be recompile the driver. There might be possible that the Kernel of your
Linux isn’t included the driver of your Ethernet card.

How to recompile the driver:
===================

1. Download the source code of the driver ( or certain Mainboard include the
driver in its CDs)
2. go to src/ folder
3. as root type: make and make install

PS: You will need gcc and kernel-source package for this compilation.

I solved this problem on my friend’s computer and it now serves as DHCP
server.. Yeah..

Enjoy,
da

Posted by: fossni | August 28, 2007

Is it secure to unplug a usb flash without unmount?

In Linux , I thought, it is not necessary to unmount a usb flash drive before unplugging. That’s wrong! We’d better tell the Linux that the flash drive is going to be unplugging by unmountting it, otherwise, you run the risk of file corruption. For instance, if you are copying a big file to flash drive, then you unplugged it. The file might be half copied. But if you unmount it, it will try to copy the whole file into drive, and then you can safely remove. In rare case, the device refuses to unmount, the solution is you should try to close all applications that run from the device.

Posted by: fossni | August 23, 2007

Clogger Summit

On 30-31 August 2007, there will be a FOSS event called Cambodian Bloggers Submit. It aims to share and learn more from each others on various topics regarding to the Internet and new technologies including Open Source Softwares and Web2.0 that would make their study, work, digital life more easier. For more info, visit http://cloggersummit.wikispaces.com/

Posted by: fossni | August 21, 2007

My favorite FOSS applications

Franking speaking, there are 24 hours per day, I’ve spent almost 12 hours
on my Linux OpenSuSE10.2. What the hell am I doing with it? The
answer is “Yeah!!! there are many many tasks that can be done on my OpenSuSE,
Coding which is my main responsibility, sending email, surfing internet,
chatting, preparing document, making project planning, listening to music,
watching movie…so what else should I need for my short life?

Eric4
openoffice.org Writer
Qt Designer
openoffice.org Writer
openOffice.org Writer
openoffice.org Writer
Posted by: fossni | July 15, 2007

FOSS and I

At the right side is me. It looks funny but meaningful. You see? I am wearing the hat saying FREE with a lovely smiley. At the first glance and being pessimistic, this photo gives people the idea that I’m trying to sell myself free, but the idea behind that is I want to show the world the freedom of using, sharing and changing the computer softwares under the GNU license.
Those softwares are so called FOSS – Free and Open Source Software. FOSS not only share with us the technical knowledge, but also teach us the way to live in a better community, to build a social networking, to increase the communication for change. Having this idea in mind, I decided to create a web blog to share people to know how FOSS is showing me the world.
Again, Looking closer, behind me are the FOSS applications’ pictures that were localized into Khmer language by KhmerOS project. Mekhala is translating from Firefox, a web browser and Moyura is coming from Thunderbird, an email client application. These are not the only two applications that were localized, take some times to visit KhmerOS, you’ll know how far of this project.

Categories