Shell Programming (1)

Source: Internet
Author: User

1

/ETC/PASSWD: User account information

/etc/shadow: Secure user account information

/etc/group: Group account information

/etc/gshadow: Security group account information

2

ID: View the user ID and group ID of the current user

Id-u: Show only User ID

Id-u Root: Displays the root user ID

Id-u QQQQ: show Muggu User ID

3

Which python: Find python files under path path

Whereis python: Finding python files from the document index database

Locate python: Finding Python files in the database

Find/usr/bin-name python:/usr/bin directly to Python files in the hard drive directory

4

Grep-n-E ' root|muggu|^user* '/etc/passwd displays records starting with Root, Muggu, and user in the directory
Grep-n-E ' [[:d igit:]] '/etc/passwd displays the digital character record in the directory
Grep-n-E ' [[: Alpha:] '/etc/passwd Displays the directory context character record
Grep-n ' [0-9]\{4,\} '/etc/group displays group information records with user group ID greater than or equal to four digits

5

Image processing tools under the Gimp:linux

6

List all files by time by default sort

List all files in chronological order from near to far

List all files in chronological order from far to near

7

View the/home directory, matching the number of D at the beginning

8

Add New User User7

View and count the number of users in the/home directory

Summarize

Through this experiment, I have a new understanding of shell programming, and understand the function and usage of various shell commands. The content of regular expressions also takes more time to learn.

Shell Programming (1)

Related Article

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.