網頁

顯示具有 command 標籤的文章。 顯示所有文章
顯示具有 command 標籤的文章。 顯示所有文章

2013年7月9日 星期二

linux command locate and updatedb

 
updatedb config file /etc/updatedb.conf

choose one of command below
sudo updatedb --prune-bind-mounts 0 --prunefs ""  --prunepath "" -U / -o  ~/Desktop/all.db  or 
sudo updatedb -U /media -o  ~/Desktop/win.db
-U is to specify the root of data base  
other parameter can refer in man page 

use the creating database all.db to locate 
locate -d ~/Desktop/all.db "you want to search"

use the creating database win.db to locate 
locate -d ~/Desktop/win.db "you want to search"