In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "how to use the locate command of the Linux system", so the editor summarizes the following, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use the locate command of the Linux system" article.
Syntax locate [- d] [--help] [--version] [template style.] Parameters:
-b,-basename-matches only the base name of the pathname
-c,-count-output only the number found
-d,-database DBPATH-uses the database specified by DBPATH instead of the default database / var/lib/mlocate/mlocate.db
-e,-existing-prints only entries for the current existing file
-1-if it is 1. Then start safe mode. In safe mode, users do not see files that cannot be seen by permissions. This starts to slow down because locate must go to the actual file system to obtain file permission data.
-0,-null-A separate entry with NUL on the output
-S,-statistics-do not search for entries and print statistics about each database
-Q-quiet mode, no error message is displayed.
-P,-nofollow,-H-check the existence of the file without following the trailing symbolic link
-l,-limit,-n LIMIT-limits the output (or count) to LIMIT entries
-n-displays at most n outputs.
-m,-mmap-ignored for backward compatibility
-r,-regexp REGEXP-use basic regular expressions
-regex-use extended regular expressions
-Q,-quiet-quiet mode, no error message is displayed
-s,-stdio-ignored for backward compatibility
-o-specifies the name of the data inventory.
-h,-help-Show help
-I,-ignore-case-ignore case
-V,-version-displays version information
Instance to find the passwd file, enter the following command:
Locate passwd searches for all files that begin with sh in the etc directory:
Locate / etc/sh ignores case to search for all files that begin with r in the current user directory:
Locate-I / r Note: locate is different from find: find is looking for the hard disk, locate is querying the database, and the general data can be found in / var/lib/slocate/slocate.db, so the search of locate is not real-time.
The above is about the content of this article on "how to use locate commands in Linux system". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.