Linux Essentials Tutorial---content operations

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.