Basic Linux operations ----- the search 1which1which command in Linux is used to find executable program files. the usage is which file name 2. for example, I create a file named tmp under the home directory, and then I whichtmp, in this way, we can't find 3 but basic Linux operations ----- search for 1 which 1 which command in Linux is used to find executable program files, usage: which file name 2. for example, if I create a file named tmp in the home directory and then I use which tmp, we cannot find 3. but if we directly use which passwd, then it will show the executable program directory 4 which find the directory must be in the brackets of these paths, such as (/usr/lib/qt-3.3/bin: /usr/local/bin:/usr/local/sbin:/usr/sbin:/home/chenguolin/bin ), the path beyond this bracket must be 2 whereis 1 whereis file name 2 whereis will list all the paths of all files related to the current file name 3 whereis is to find your own database, it is a file that has been written to the relevant database, so the query efficiency is very high. Therefore, if the file we created ourselves may not be found, 3 locate 1 locate file name 2 locate also has its own database, its search is also included in the file 3 locate in its own database. all the files that protect the file name will be listed, but it is fuzzy, the list of files is more than 4 find 1 find searches will search for the entire hard disk, this speed will be very slow 2 find file name, if the file name is not written, all files will be queried by default. 3. if the previous items can be found, we do not recommend using the find command.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service