/bigdata/software/sqoop/bin:/home/bigdata/software/hbase/bin:/ home/bigdata/software/zeppelin/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/bigdata/ Software/hadoop/bin:/home/bigdata/software/hive/bin:/home/bigdata/software/sqoop/bin:/home/finance/bin)DescriptionCD is a common command can not find Ah! Why is it?This is because the CD is a command built in bash! But which default is to find the PATH within the standard directory, so of course, must not find!2.whereisThe W
.log-a-not-newer File2.log⑨, find all directory files in/etc level directoryFind/etc-maxdepth 1-type DFiles larger than 100M in ⑩, query/directoryFind/-size +100m11. Delete the normal file of non-hidden files in/root level directoryFind ~-maxdepth 1-type f |grep-v "/root/\."12, query the current system does not belong to the host group of filesFind/-nouser-a-nogroup13. Find all files with suid permission in the systemFind/-perm/u=s14. Find all files with Sgid permission in the systemFind/-perm/g
1. File name Lookup
Use Find query, because disk query, so slow, so Linux query more often use which, whereis, locate to query, because it is using database query, so fast.
2. Which
We commonly use the LS command, and if we want to know where these common commands are placed, the which command is used to query the address. which uses the PATH environment variable to find the filename, WHICH-A returns all the commands found, and returns the first
MySQL string intercept function: Left (), right (), substring (), Substring_index (). There is also mid (), substr (). where mid (), substr () is equivalent to the substring () letter
LOCATE (SUBSTR,STR)POSITION (substr in str)
Returns the position of the substring substr the first occurrence in string str. If substring substr does not exist in STR, the return value is 0:
The code is as follows
Copy Code
mysql> SELECT
Command Lookup-which
The which command is used to find executable files contained in path (that is, commands)
which [-A] command
-A: List all commands
File and directory Lookup-Whereis, locate, find
Where Whereis and locate are found from the database, so they are faster, but unable to find the most recent data, because the database is updated daily by default (or you can perform a manual update of the
Recently started to contact Linux, in the virtual machine loaded Ubuntu, the current version is Ubuntu 11.10, installed after the natural installation of some software, after setting the source of the software, began the sudo apt-get install, the results appear the following unable to Locate Package Error:
[Email protected]:~$ sudo apt-get install mysql-server mysql-client
[sudo] password for letuknowit:
Reading Package Lists ... Done
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
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.