1. Summarize the use of the commands involved in this course and show the relevant examples;
2. Summarize basic regular expressions and extended regular expressions
4, display the two-digit or three-digit number in the/etc/passwd file
-
cat/etc/passwd| grep ' [[:d igit:]]\{2,3\} '
-
cat/etc/passwd| grep ' [[:d igit:]]\{2,3\} ' |grep-v ' [[:d igit:]]\{4,\} '
5. Display lines with ' LISTEN ' followed by 0, one or more whitespace characters in the ' Netstat-tan ' command result
6. Add user bash, Testbash, basher, and Nologin user (Nologin user's shell is/sbin/nologin), then find the same line in the/etc/passwd file as the user name and its shell name
7. Display the default shell and UID of root, CentOS, or User1 user on the current system (please create these users beforehand, if not present)
8, find a word in the/etc/rc.d/init.d/functions file (the middle of the word can be underlined) followed by a set of parentheses line
9, use echo to output a path, and then egrep find its path base name; Further use Egrep to remove its directory name
10. Find the number between 1-255 in the result of ifconfig command execution
This article is from the "Flyingdream" blog, make sure to keep this source http://lingguang2008.blog.51cto.com/8221381/1690770
Marco Linux+python--2015 Year August 27 course assignment