母校
November 15, 2009
November 2, 2009
Ten Commands Every Linux Developer Should Know
Worth take a look and find tools useful to you.
http://www.linuxjournal.com/article/7330
fuser: a long desired tool
Finally I found the right tool for the task — tell which process have opened a given file.
===
The name is a mnemonic for file user and tells what processes have opened a given file. It also can send a signal to all those processes for you. Suppose you want to delete a file but can’t because some program has it open and won’t close it. Instead of rebooting, type fuser -k myfile. This sends a SIGTERM to every process that has myfile opened.
Perhaps you need to kill a process that forked itself all over the place, intentionally or otherwise. An unenlightened programmer might type something like ps | grep myprogram. This inevitably would be followed by several cut-and-paste operations with the mouse. An easier way is to type fuser -k ./myprogram, where myprogram is the pathname of the executable. fuser typically is located in /sbin, which generally is reserved for system administrative tools. You can add /usr/sbin and /sbin to the end of your $PATH.
Love and UNIX: An Undying Affection (ZZ)
An operating system, like almost anything, is a reflection of the values, personality, and ultimately, the psyche of the designer. And its followers usually agree with these perspectives.
(copied from http://broadcast.oreilly.com/2009/02/love-and-unix-an-undying-affec.html)
VIM :g
Do something on lines that mach a search pattern (this is what I always forget because I don’t use it that often):
:g/search pattern/command
Delete empty lines using the above:
:g/^$/d
Delete lines starting with #
:g/^#/d
November 1, 2009
valgrind
I used to think valgrind is complex to use. Actually it turned out it is very simple and powerful tools to catch common memory leak/access problems. Every one who program should use this tool, it will save you tons of time.
October 26, 2009
Nvidia naming
After Tesla and Fermi, I realized that NVidia has been naming their products based on famous physicists’ names.
Similarly open source developers like to name their product/releases based on animals, lik Ubuntu, etc.