Find the specified content in the file
look for the specified content in the file, all the information on the line where the content is printed
grep is searched for content file path name
>grep var passwd//In the passwd file to output the contents of the line of the Var word
Second, pipeline Pipe
The pipe is: the output of the former is the input content of the latter.
grep var passwd | grep Denny
Using pipelines, in the passwd file, search for a single line of content with Var. There are also Dnny
> Ls‐l | WC//Calculate how much file information the current folder has in common
> Ls‐l | HEAD‐10//Output the top 10 messages in the current folder
> Ls‐l | head‐50 | TAIL‐10//Output The current folder before the 41st ‐‐‐ 50 file information
File lookup Find command
Nogroup‐‐à The files that I created you got your own Linux or downloaded files from the Internet
Perm for permissions
Find Lookup Instructions
Find Find Folder Options option value option value:
>find/‐name passwd//Find file name in root folder word equals passwd file will traverse all folders of the system for file lookup
>find/‐name"app*"//Fuzzy Lookup name is the app start file need double
>find/‐maxdepth 4‐mindepth 3‐name passwd/3 to 4 Search for a file named passwd between levels
Options:
‐name//Search by file name word for the condition
‐maxdepth//Limit the deepest level of lookups
‐mindepth//Limit search to the lightest level
‐size//Find default units by file size: Five bytes byte units: number C
> Find/‐size 50c//Find a file size of 50 bytes in the current folder kilobytes unit: Number K
Scope of limitation:
+ Number unit: File size larger than a range
-Numeric unit: File size less than a range
> Find/‐size‐50c//Look for files in the current folder that are smaller than 50 bytes in size
Pdf:
http://download.csdn.net/detail/obuyiseng/9006517
Linux Essentials Tutorial---content operations