Difference between revisions of "Updatedb"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Information_tools|Information tools</yambe:breadcrumb> =updatedb= '<tt>updatedb</tt>' and '<tt>locate</tt>' allow indexing of entire filesystem. Later a fi...")
 
m
 
Line 1: Line 1:
<yambe:breadcrumb>Information_tools|Information tools</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Information tools]] > [[Updatedb]]
=updatedb=


'<tt>updatedb</tt>' and '<tt>locate</tt>' allow indexing of entire filesystem.  Later a file can be searched based on name using the generated index.  But sometimes there are filesystems such as encfs or folders such as backup folders, which are not desired to be part of the generated index.  In such cases updatedb can be configured to ignore specific file-systems or file-paths by editing '<tt>/etc/updatedb.conf</tt>' file.   
'<tt>updatedb</tt>' and '<tt>locate</tt>' allow indexing of entire filesystem.  Later a file can be searched based on name using the generated index.  But sometimes there are filesystems such as encfs or folders such as backup folders, which are not desired to be part of the generated index.  In such cases updatedb can be configured to ignore specific file-systems or file-paths by editing '<tt>/etc/updatedb.conf</tt>' file.   
Line 13: Line 12:


To exclude folders such as in case of virtualization openvz base folder /vz or backup folders which contain duplicate copies of other files from updatedb indexing the full-paths of these folders should be added to variable "PRUNEPATHS" in '<tt>/etc/updatedb.conf</tt>' file.
To exclude folders such as in case of virtualization openvz base folder /vz or backup folders which contain duplicate copies of other files from updatedb indexing the full-paths of these folders should be added to variable "PRUNEPATHS" in '<tt>/etc/updatedb.conf</tt>' file.
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Information tools]] > [[Updatedb]]

Latest revision as of 14:50, 24 August 2022

Home > CentOS > CentOS 6.x > Information tools > Updatedb

'updatedb' and 'locate' allow indexing of entire filesystem. Later a file can be searched based on name using the generated index. But sometimes there are filesystems such as encfs or folders such as backup folders, which are not desired to be part of the generated index. In such cases updatedb can be configured to ignore specific file-systems or file-paths by editing '/etc/updatedb.conf' file.


Excluding file-systems

To exclude file-system its name which matches exactly as it appears in '/etc/mtab' entry must be known. For example in case of encfs mounted filesystem '/etc/mtab' shows encfs. Once name of filesystem is known it can be added as a space separated value for variable "PRUNEFS" in /etc/updatedb.conf file.


Excluding folders

To exclude folders such as in case of virtualization openvz base folder /vz or backup folders which contain duplicate copies of other files from updatedb indexing the full-paths of these folders should be added to variable "PRUNEPATHS" in '/etc/updatedb.conf' file.



Home > CentOS > CentOS 6.x > Information tools > Updatedb