install package
download package either by browser or wget a .deb file
sudo dpkg -i XXXXX.deb
if meet issues, try below
sudo apt-get -f install
sudo dpkg -i XXXXX.deb
to update current install package
sudo apt-get update
install svn
1. install apache2
sudo apt-get install apache2
configure apache2
....
2. install svn
sudo apt-get install subversion
configure svn and start svn daemon
To list packages install in system
pkg-config --list-all
To uninstall a make install
sudo make uninstall
if not work
try
checkinstall
or use
make -n install
to trace install steps and uninstall manually
2017年8月26日 星期六
2012年1月1日 星期日
利用find shell command 找檔案
普通用法
find -inamme *.c
這樣會把現在所在目錄下以及子目錄下的.c 檔列在螢幕上
高級用法
可以把輸出轉向到另一個指令的輸入
ex.
find -iname *.c -exec grep -l MEM_LENGH {} \;
會列出所有.c 裡有包含MEM_LENGH的檔案名稱
find -inamme *.c
這樣會把現在所在目錄下以及子目錄下的.c 檔列在螢幕上
高級用法
可以把輸出轉向到另一個指令的輸入
ex.
find -iname *.c -exec grep -l MEM_LENGH {} \;
會列出所有.c 裡有包含MEM_LENGH的檔案名稱
2011年12月27日 星期二
Linux char device driver todo list
- __init 和 __exit function裡面implement add/remove cdev structure, apply/release device ID
- implement file_operation 裡有用到的function 如 read() write() ioctl()
另外在driver 的Makefile裡
obj-y 代表 build進kernel
obj-m 代表build成module 型式, 也就是*.ko
obj-n 代表不build
通常obj-後面會用Kconfig裡的變數取代, 在make menuconfig後, kconfig會把各目錄下的.config parse一遍, 知道user的設定在shell的variables裡, 然後在building time依據設定build kernel
2011年12月20日 星期二
shell script
最近學習linux的shell script
做一寫筆記備用
$1 $2 ..... parameter 1 2 ....
$# total number of parameter
$? return value of previous command
$@ list of all parameters one bye one
$* list all parameters with one string
logic operator
1.
while [ true ] ; do
done
2.
until [ ] ; do
done
3.
for arg in " "
do
done
4.
if [ ]
then
else
fi
Online Tutorial Link
做一寫筆記備用
$1 $2 ..... parameter 1 2 ....
$# total number of parameter
$? return value of previous command
$@ list of all parameters one bye one
$* list all parameters with one string
logic operator
1.
while [ true ] ; do
done
2.
until [ ] ; do
done
3.
for arg in " "
do
done
4.
if [ ]
then
else
fi
Online Tutorial Link
2011年11月29日 星期二
2011年10月1日 星期六
2011年9月30日 星期五
訂閱:
文章 (Atom)