Example Locate files by name in the entire (Web hosting services)
Friday, August 31st, 2007Example Locate files by name in the entire directory hierarchy that might have something to do with the csh shell or its variants: # locate “*csh*” /home/jdean/.tcshrc /root/.cshrc /root/.tcshrc /usr/bin/sun-message.csh /usr/doc/tcsh-6.08.00 /usr/doc/tcsh-6.08.00/FAQ /usr/doc/tcsh-6.08.00/NewThings /usr/doc/tcsh-6.08.00/complete.tcsh /usr/doc/tcsh-6.08.00/eight-bit.txt /usr/doc/vim-common-5.3/syntax/csh.vim /usr/man/man1/tcsh.1 /usr/share/apps/ktop/pics/csh.xpm /usr/share/apps/ktop/pics/tcsh.xpm /usr/share/emacs/20.3/etc/emacs.csh /usr/share/vim/syntax/csh.vim /usr/src/linux-2.2.5/fs/lockd/svcshare.c /etc/csh.cshrc /etc/profile.d/kde.csh /etc/profile.d/mc.csh /bin/csh /bin/tcsh The locate command must have a recent database to search, and that database must be updated periodically to incorporate changes in the filesystem. If the database is stale, using locate yields a warning: # locate tcsh locate: warning: database /var/lib/slocate/slocate.db’ is more than 8 days old updatedb Syntax updatedb [options] Description Refresh (or create) the slocate database in /var/lib/slocate/slocate.db. Option e directories Exclude a comma-separated list of directories from the database. Example Refresh the slocate database, excluding files in temporary locations: # updatedb -e “/tmp,/var/tmp,/usr/tmp,/afs,/net,/proc” updatedb is typically executed periodically via cron. Study Guide101 Find System Files and Place Files in the Correct Location 131
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.