A linux command (17) every day: whereis command link: A linux command (1) every day: ls command restart (2): cd command http://www.2cto.com/ OS /201210/163050.html#a Li every day ..
One linux command every day (17): whereis command link: One linux command every day (1): ls command http://www.2cto.com/os/201210/163049.html ; One linux command every day (2): cd command http://www.2cto.com/os/201210/163050.html ; One linux command every day (3): pwd command http://www.2cto.com/os/201210/163462.html ; One linux command every day (4): mkdir command http://www.2cto.com/os/201210/163463.html ; One linux command every day (5): rm command http://www.2cto.com/os/201210/163662.html ; One linux command (6) every day: rmdir command http://www.2cto.com/os/201210/164017.html ; One linux command (7) every day: mv command http://www.2cto.com/os/201210/164247.html ; One linux command every day (8): cp command http://www.2cto.com/os/201210/164254.html ; One linux command every day (9): touch Command http://www.2cto.com/os/201211/165699.html ; One linux command every day (10): cat command http://www.2cto.com/os/201211/165989.html ; One linux command every day (11): nl command http://www.2cto.com/os/201211/165990.html One linux command every day (12): more command http://www.2cto.com/os/201211/165994.html One linux command every day (13): less command http://www.2cto.com/os/201211/165998.html One linux command every day (14): head Command http://www.2cto.com/os/201211/166191.html One linux command every day (15): tail command http://www.2cto.com/os/201211/168702.html One linux command every day (16): which command http://www.2cto.com/os/201211/168890.html The whereis command can only be used for searching program names, and only binary files (parameter-B), man description files (parameter-m), and source code files (parameter-s) can be searched ). If the parameter is omitted, all information is returned. Compared with find, www.2cto.com is faster than whereis, because the linux system records all files in the system in a database file, when whereis and the locate described below are used, data will be searched from the database, instead of searching through the hard disk like the find Command, which will naturally be very efficient. However, this database file is not updated in real time. it is updated once a week by default. Therefore, when we use whereis and locate to find the file, we sometimes find the deleted data, you can't find the file you just created because the database file is not updated. 1. command format: whereis [-bmsu] [BMS directory name-f] file name 2. command function: the whereis command locates executable files, source code files, and help files in the file system. The attributes of these files should belong to the original code, binary file, or help file. The whereis program also provides the ability to search for source code, specify a backup search path, and search for unusual items. 3. command parameter:-B locates the executable file. -M: Locate the help file. -S: locate the source code file. -U searches for executable files, source code files, and help files in the default path. -B specifies the path to search for executable files. -M specifies the path for searching the help file. -S specifies the path to search for source code files. 4. use instance: instance 1: Find all files related to the ** File. Command: whereis svn output: [root @ localhost ~] # Whereis tomcattomcat: [root @ localhost ~] # Whereis svnsvn:/usr/bin/svn/usr/local/svn/usr/share/man/man1/svn.1.gz description: tomcat is not installed and cannot be found, svn installation found a lot of related file instances 2: only find the binary file command: whereis-B svn output: [root @ localhost ~] # Whereis-B svnsvn:/usr/bin/svn/usr/local/svn [root @ localhost ~] # Whereis-m svnsvn:/usr/share/man/man1/svn.1.gz [root @ localhost ~] # Whereis-s svnsvn: [root @ localhost ~] # Note: whereis-m svn finds the path of the instruction document, and whereis-s svn finds the source file.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.