UPDATEDB(1)
β¨ UPDATEDB(1) β¨
okay bestie, so this is the updatedb manual page, straight out of the General Commands Manual section of your friendly neighbourhood man pages π pull up a chair, we're building a file name database and it's gonna be iconic.
πΈ NAME πΈ
updatedb β update a file name database. that's it. that's the whole job. she updates, she slays, she goes home π
π SYNOPSIS π
updatedb [options]
like, options are optional, she's flexible, she contains multitudes β¨
π¦ DESCRIPTION π¦
so this page right here documents the GNU version of updatedb, and what she does is update the file name databases that GNU locate uses π₯
and what even is a file name database, you ask? it's literally a list of files β the files that were chillin' in particular directory trees back when the database was last updated. so it's a snapshot. a little time capsule of ur filesystem πΈ
the file name of the default database? that gets determined whenever locate and updatedb are configured and installed. so it depends on ur setup, bestie. and how often the databases get updated, plus which directories they have entries for, all depends on how often you run updatedb and with which arguments. you are the main character here β the behaviour follows you π
now, in networked environments (iykyk), it often makes sense to build a database at the root of each filesystem, containing the entries for that filesystem. then you run updatedb for each filesystem on the fileserver where that filesystem is on a local disk β the whole point being to prevent thrashing the network π nobody wants that. users can pick which databases locate searches using an environment variable or a command line option; peep locate(1) for that. and heads up: databases cannot be concatenated together. no merging, no gluing, no franken-database π
okay history lesson, because she's that girl π the LOCATE02 database format got introduced in GNU findutils version 4.0, specifically so that machines with different byte orderings could share databases. teamwork! and GNU locate can read both the old format and LOCATE02, though ngl, support for the old pre-4.0 database format will be removed shortly. so like. don't get attached π
β¨ OPTIONS β¨
--findoptions='-option1 -option2...'β global options you pass on tofind. the environment variableFINDOPTIONSalso sets this value. default is none. nothing. nada π«Ά--localpaths='path1 path2...'β non-network directories to put in the database. default is/. yes, the whole thing, she's ambitious π--netpaths='path1 path2...'β network directories (NFS, AFS, RFS, etc.) to put in the database. the environment variableNETPATHSalso sets this value. default is none πΈ--prunepaths='path1 path2...'β directories to not put in the database, which would otherwise be in there. and listen: remove any trailing slashes from the path names, otherwiseupdatedbwon't recognise the paths you want to omit β because she uses them as regular expression patterns, bestie π§ default is/tmp /usr/tmp /var/tmp /afs. the environment variablePRUNEPATHSalso sets this value.--prunefs='path...'β file systems to not put in the database, which would otherwise be in there. note that files get pruned when a file system is reached, so any file system mounted under an undesired file system will be ignored. the environment variablePRUNEFSalso sets this value. default isnfs NFS procπ--output=dbfileβ the database file to build. default is system-dependent. and on Debian GNU/Linux, the default is/var/cache/locate/locatedbβ--localuser=userβ the user to search non-network directories as, usingsu(1). default is to search the non-network directories as the current user. you can also use the environment variableLOCALUSERto set this user π--netuser=userβ the user to search network directories as, usingsu(1). default isdaemon. you can also use the environment variableNETUSERto set this user π--dbformat=Fβ create the database in format F. the default format is calledLOCATE02. alternatively theslocateformat is also supported. when theslocateformat is in use, the database produced is marked as having security level1. and if you want to build a system-wideslocatedatabase, you may want to runupdatedbasrootπ₯--versionβ print the version number ofupdatedband exit. short, sweet, iconic π--helpβ print a summary of the options toupdatedband exit. ur little cheat sheet π
π BUGS π
the updatedb program correctly handles filenames containing newlines β but only if the system's sort command has a working -z option. so like, conditional slay π
if you suspect that locate may need to return filenames containing newlines, consider using its --null option. just a lil tip π«Ά
π£ REPORTING BUGS π£
GNU findutils online help: <https://www.gnu.org/software/findutils/#get-help>
report any translation bugs to <https://translationproject.org/team/>
report any other issue via the form at the GNU Savannah bug tracker: <https://savannah.gnu.org/bugs/?group=findutils>
general topics about the GNU findutils package are discussed at the bug-findutils mailing list: <https://lists.gnu.org/mailman/listinfo/bug-findutils>
(not me pasting every single link, we leave NO detail behind π )
π COPYRIGHT π
Copyright Β© 1994β2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law. (say it with me: no warranty, no cap π€)
π«Ά SEE ALSO π«Ά
full documentation <https://www.gnu.org/software/findutils/updatedb> or available locally via: info updatedb β¨
and that's the whole page, bestie π¦ this was UPDATEDB(1) from the General Commands Manual, GNU findutils era, dated 1994β2024 and still eating π go forth and update ur database, u absolute icon ππ
π¦ where this page comes from
- alpine 3.22: findutils-doc 4.10.0-r0 Β· GPL-3.0-or-later
- alpine 3.23: findutils-doc 4.10.0-r0 Β· GPL-3.0-or-later
- alpine 3.24: findutils-doc 4.10.0-r1 Β· GPL-3.0-or-later
- nixos 26.05: findutils 4.10.0-locate
- nixos 26.05: findutils-static 4.10.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms