Copied to clipboard

updatedb

`updatedb` command is used to create an index database for quickly locating files in the file system. This command is usually used as the underlying implementation of the `locate` command, which is used to quickly search for files in the file system.

Example

  1. Update the database with default parameters:
updatedb
  1. Specify the directory path of the database to be updated:
updatedb -d /home/user
  1. Specify the file name of the database to be updated:
updatedb -f my_db.db
  1. Output the result to a specified file:
updatedb -o /home/user/my_db.txt
  1. Do not update the database:
updatedb -c
  1. Do not search any file system:
updatedb -e
  1. Do not search ignored directories:
updatedb -i
  1. Output the contents list of the database:
updatedb -l
  1. Do not follow symbolic links for searching:
updatedb -p
  1. Do not output error messages:
updatedb -s