Linux grep Practice __linux

Source: Internet
Author: User

1, showing the/proc/meminfo in the file with the beginning of a case-insensitive s line;



2. Display the line ending with Nologin in the/etc/passwd;



3, the display/etc/inittab with a # start, and followed by one or more white space characters, and then followed by a line of any character;




4, display/etc/inittab contains: A number: (that is, two colon in the middle of a number) line;



5. Display the line that begins with one or more white-space characters in the/boot/grub/grub.conf file;



6. Display the line in the/etc/inittab file that starts with a number and ends with a number that is the same as the beginning number ;



7, Ifconfig command can display the current host IP address information, etc., if the use of grep and other text processing commands to remove the local IP address, the requirements do not include 127.0.0.1;



8, the display/etc/sysconfig/network-scripts/ifcfg-eth0 file contains a similar IP address dotted decimal number format line;

     



reprint please indicate Xiao Liu

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.