網頁

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"

沒有留言:

張貼留言