Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Wednesday, February 11, 2009
[tip]Turn off automatically scanning disk when reboot
tune2fs -i 0 -c 0 /dev/sdx
Friday, May 23, 2008
[tip]convert dos format to unix
In vi/vim,
set file format=unix
or dos2unix, unix2dos
set file format=unix
or dos2unix, unix2dos
Thursday, May 22, 2008
[tip]Makefile
Build c/c++ project always need third party library on linux, such as gtk+, glib. Writing their absolute path in Makefile is not flexible way. You can use pkg-config instead of the absolute path. Below is code snippet:
GTK_LIB=$(shell pkg-config --libs gtk+-2.0)
GTK_INC=$(shell pkg-config --cflags gtk+-2.0)
gcc -o yourlibrary.so $(GTK_INC) $(GTK_LIB)
GTK_LIB=$(shell pkg-config --libs gtk+-2.0)
GTK_INC=$(shell pkg-config --cflags gtk+-2.0)
gcc -o yourlibrary.so $(GTK_INC) $(GTK_LIB)
Wednesday, March 19, 2008
[shell]Learning Note - 3/19/08
1> 是输出正确数据, 2> 则是错误数据输出项目, 若要同时写入同一个档案需要使用 2>&1 /dev/null 是什么呢?基本上,那就有点像是一个『黑洞』的垃圾桶功能!当你输入的任何东西导向到这个虚拟的垃圾桶装置时,『他就会凭空消失不见了~~』
Subscribe to:
Posts (Atom)