[Linux] linux updatedb command base

1. Functional Description

updatedb command to create or update a database file slocate command is necessary. Updatedb command execution process longer, because it will traverse in the implementation of the directory tree of the entire system, and writes slocate database file all the file information.

Supplement: slocate itself has a database, stored inside information about the system files and directories

2. Command Syntax

updatedb (option)

Command Options

  • -o <file>: Ignore the default database file, using the specified slocate database file;
  • -U <directory>: Updates the specified directory slocate database;
  • -v: Displays detailed process execution.

3. Command Examples

-U practical option updatedb command to specify the directory to be updated slocate database.

-U updatedb / usr / local /   # update the specified command slocate database

 

Reference documents:

linux updatedb command Detailed

Guess you like

Origin www.cnblogs.com/badboy200800/p/11227648.html