updatedb

Create or update the database files necessary for the slocate command

Supplementary instructions

updatedb command is used to create or update the database files necessary for the slocate command. The execution process of the updatedb command is long because it traverses the directory tree of the entire system and writes all file information into the slocate database file.

Additional explanation: slocate itself has a database that stores information about files and directories in the system.

grammar

updatedb(option)

Options

-o<file>: Ignore the default database file and use the specified slocate database file;
-U<directory>: Update the slocate database of the specified directory;
-v: Display the detailed process of execution.

Example

Use the -U option of the updatedb command to specify the directory to update the slocate database.

updatedb -U /usr/local/ updates the slocate database of the specified command
继续阅读

接下来你可能需要这些内容

优先推荐相关内容,同时保留你的阅读轨迹和收藏入口。