Reading Notes: Linux and Unix shell programming guide

Source: Internet
Author: User

This book has been read and written before. It is good to read again to deepen your memory.

Chapter 4 file security and permissions

1. directory permission bit

The directory permission bit is different from the file. The read permission bit of the Directory means that the contents can be listed. Write Permission bit means you can create a file in this directory. If you do not want other users to create a file in your directory, you can cancel the corresponding write permission bit. The execution permission limit indicates that the directory is searched and accessed.

2. Use and set SUID/GUID

 

3. umask usage

Umask can be understood as follows: it is through this to specify the permissions to be removed,

 

Chapter 2 Use Find and xargs

1. General Form of the find command

 

2. Use the name Option

 

3. Use the perm Option

 

4. Use the prune option to ignore a directory

 

5. Use the user/nouser and group/nogroup options

 

6. Search for files based on the Change Time

 

7. Search for new or old files than a file

8. Use Type to find some types of files

 

9. Use size to search for files based on the file size

10. Use depth to match all files before searching for subdirectories.

 

11. execute shell commands using exec/OK

 

12. Use xargs

 

Chapter 2 shell Input and Output

1. Tee command

 

2. File redirection

 

Chapter 4 command execution sequence

Use & | to associate multiple commands.

Use () and {} to combine the commands.

Chapter 1 Regular Expressions

The number of times the matching result is displayed in the \ {\} match mode.

Use * to match all matching results at any time. However, if you specify the number of times, use \ {\}. There are three modes:

Format:

Pattern \ {n \} match mode appears n times.

Pattern \ {n, \} match mode appears at least N times.

Pattern \ {n, m} match mode appears between N and m, n, m is any integer between 0 and.

In the first example, the matching letter A appears twice and ends with B. The operation is as follows:

A \ {2 \} B

The matching value is AAB.

Match A at least 4 times. Use:

A \ {4, \} B

The result can be aaaab or aaaaaaab, but it cannot be aaab.

If the range of occurrences is given, for example, a appears two to four times:

A \ {2, 4 \} B

The result is AAB, aaab, aaaab, rather than aaaaab.

Chapter 2 grep family

1. grep command, double quotation marks, Option

 

2. Use exact match in grep

 

3. Class Name

 

Chapter 4 awk usage

1. metacharacters in awk

 

2. Conditional operators in awk

 

3. Powerful built-in string functions in awk

 

Chapter 2 merging and separation

1. Sort usage

 

Chapter 1 tr usage

1. Usage Overview

 

2. Remove repeated characters

 

3. Delete empty rows

 

4. case-insensitive Conversion

5. conversion control characters

 

Chapter 2 Shell functions

1. Pass parameters to the Function

2. Return from the function

3. function return value test

Chapter 2 shell tools

1. Trap capture Signal

 

2.

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.