locate
UK[ləʊˈkeɪt] US[ˈloʊkeɪt]
vt. Located; state the source; find the location of…; determine the location of…
vi.Locate; settle
Third person singular: locates Present participle: locating Past tense: located Past participle: located
Linux slocate command syntax
Function: The slocate command searches for files or directories. Slocate itself has a database that stores information about files and directories in the system.
Syntax: slocate [-u][--help][--version][-d <Directory>][Find file]
Linux slocate command example
Use the command "slocate" to display the file path information containing the keyword "fdisk" in the file name. Enter the following command:
$ slocate fdisk #显示文件名中含有fdisk关键字的文件的路径信息
After executing the above command, the output information of the command execution is as follows:
$ slocate fdisk #显示文件名中含有fdisk 关键字的文件的路径信息 /root/cfdisk #搜索到的文件路径列表 /root/fdisk /root/sfdisk /usr/include/grub/ieee1275/ofdisk.h /usr/share/doc/util-Linux/README.cfdisk /usr/share/doc/util-Linux/README.fdisk.gz /usr/share/doc/util-Linux/examples/sfdisk.examples.gz