Transferred from:
Http://www.kuqin.com/linux/20091009/70532.html
1. Find
Find is the most common and powerful search command. You can use it to find any file you want.
The format of find is as follows:
$ Find
-
-
-
If no parameters are added, find searches for the current directory and Its subdirectories by default, does not filter any results (that is, returns all files), and displays them all on the screen.
Find instance:
$ Find.-Name "My *"
Search for all files whose names start with "
The indexOf-like method LOCATE () and indexoflocate in mysql
LOCATE (substr, str), LOCATE (substr, str, pos)
The first syntax returns the position of substr In the first occurrence of the string str.
The second syntax returns the position of the substring substr in the string str, the first occurrence from the pos. If substr is not in str, the return value i
The Linux locate command is used to find a document that meets the criteria. It stores the document and directory name in the database to find the document or directory that meets the template style criteria.Generally, you only need to enter locate your_file_name to find the specified file.SyntaxLocate [-d] [-- help] [-- version] [template style...]Parameters: -D or -- database = the database used to con
replace Yo, that is whereis and locate!3 , LocateThe locate command is actually another way of writing "Find-name", but much faster than the latter because it does not search for a specific directory, but instead searches for a database (/var/lib/locatedb), which contains all the local file information. The Linux system automatically creates this database and updates it automatically once a day, so you can
route, so the basic function is to find the executable file2, WhereisGrammar:[[email protected] ~]# Whereis [-bmsu] file or directory nameParameter description:-B: Only binary files are found-M: Only files found under the manual path of the description file-S: Find source files only-u: File without document descriptionFor example:[Email protected] ~]# Whereis passwdpasswd:/usr/bin/passwd/etc/passwd/usr/share/man/man1/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the p
added, find searches the current directory and its subdirectories by default, and does not filter any results (that is, all files are returned) and displays them all on the screen.Examples of use of find:$ find. -name ' my* ' – lsSearches the current directory (with subdirectories, below) for all files with the file names that begin with my, and displays their details.$ Find/home-user RTOsSearch for files owned by the owner as RTOs$ find. -type f-mmin-10Searches the current directory for all th
/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data is looked up from the database, not like the Find command, By traversing
] ~]# Whereis passwdpasswd:/usr/bin/passwd/etc/passwd/usr/share/man/man1/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data
/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data is looked up from the database, not like the Find command, By traversing
, search for normal files + special files + directories.2. LocateThe locate command is actually another way of writing "Find-name", but much faster than the latter because it does not search for a specific directory, but instead searches for a database (/var/lib/locatedb), which contains all the local file information. The Linux system automatically creates this database and updates it automatically once a day, so you can't find the latest changed fil
INSTR (STR,SUBSTR)Returns the first occurrence of a string of str neutron strings. This is the same as locate (), unless the order of the parameters is reversed.
The code is as follows
Copy Code
mysql> SELECT INSTR (' Foobarbar ', ' Bar ');-> 4mysql> SELECT INSTR (' Xbar ', ' foobar ');-> 0
LOCATE (SUBSTR,STR), LOCATE (Subst
Nanning SEO small knitting to believe that we all will feel for a new station, we choose the core keywords and target keywords, usually is difficult to choose, how we should select the core of our site keywords and target keywords. Let's look at this topic together.
First, the new station positioning core keywords and target key words importance
For the new station, positioning the new station's core keywords and target keyword is a lot of people are difficult to choose things, Nanning seo b
Tags: no latest BFS group pts syslog ISO inotify proc1.locateThe locate command is a file search command that searches faster than the find command because it does not search for a specific directory.Instead, it searches for a database that contains all the local file information. The Linux system automatically creates this database,and automatically updated every day, so use locate this command to find the
There are several commands on the Linux system for file search, such as: Locate,wheris and find are more commonly used in work.1.locate command: Locate the lookup file is based on the/var/lib/mlocate database, which contains all the local file information, the Linux system automatically creates the database and updates it automatically every day. You have just cr
Tags: man full path Specify byte traversal/etc Directory file Eve pipelineThere are a lot of search tools in Linux, and today we mainly explain locate,find two tools.1.Locate(1) Querying system for pre-built file index database/var/lib/mlocate/mlocate.dbNote : If this file is deleted, locate will not be able to use it. You need to manually update the database (up
When using Baidu Map to locate on the simulator, often reported such errors:This function is called when the/*** location fails * @param error number */-(void) Didfailtolocateuserwitherror: (Nserror *) Error{nslog (@ "%@", error);// Error Domain=kclerrordomain code=0 "The operation couldn ' t be completed. (kclerrordomain error 0.) "}At first, I doubted that the simulator could not be located. However, the Baidu Map SDK does provide a static library o
Using PL/SQL profiler to locate PL/SQL bottleneck code for SQL optimization, you can use SQL tuning advisor to achieve automatic SQL optimization and adjustment. For PL/SQL code, there are both SQL code and PL/SQL code. It is far from enough to use only 10046 events, because the SQL time may be very short, the entire package or process is executed for a long time, and other packages, processes, and functions are nested in the package or process. It se
positioning)If you want to place an element in a document in a specified location, you can use absolute to locate it, set the element's position to absolute, and use top,bottom,left,right to locate it.Absolute positioning causes the element to be deleted from the document stream , and the result is that the space occupied by the element is filled with other elements.4,mix relative and absolute (mixed relat
First of all, I am just a simple HDFs query program, and do not build a Hadoop environment, to build the environment also need to see the detailed tutorial.Error: Failed to locate the winutils binary in the Hadoop binary pathJava.io.IOException:Could not locate executable null \bin\winutils.exe in the Hadoop binaries.The predecessor said this is the window system reason, actually did not have the influence,
This article mainly introduces how to locate web page characters using javascript. It analyzes the techniques related to searching and locating javascript page elements, and has some reference value, for more information about how to use javascript to locate web characters, see the following example. Share it with you for your reference. The details are as follows:
Enter the string to be queried. After you
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.