Linux general technology-Linux programming and kernel information. Preface
Writing notes while reading a book is a good habit.
Day 1:
1. Important shell
Bash
Tcsh
2. Command Line execution sequence
Alias
Keywords
Function
Built-in commands
Executable program // Disk File
3. process: a program that can be identified by a separate pid in linux
4. process view command
Ps
Patree
5. shell system call
Fork
Wait
Exec: copy the parent process and obtain the child process. Load the child process as a new process.
Exit: exit the process under any circumstances. When exiting, The sigchild signal is sent. If it is between 0 and, 0 indicates that the process is successfully exited. If it is not 0, some errors occur. $? Is the status variable when the last executable command exits.
6. Inheritance
Sub-processes need to inherit many things from the parent process:
6.1
Permission:
* ** User permission: the most important thing is EUID. You can use setuid and setgid to modify EGID.
* ** File Permission: umask = 022. You can use chmod and chown to change the File Permission and owner.
6.2
Working directory: Sub-processes have their own working directories, and can be changed using the internal command cd.
6.3
Variable:
* ** Environment variable: if a child is uploaded to the parent database, the Child shell changes the environment variable value but does not return the value to the parent shell.
* ** Local variables: private, not descendant.
7. redirection and Pipelines
7.1 file description:
0 standard input
1 standard output
2 standard errors
3. A new file
7.2 redirection
>
<
>
<
7.3 pipelines: the shared memory zone reads data while writing data. This saves the trouble of writing buffer files. It is called by the pipe system to manipulate the two pipelines.
8. Signal
Shell can specify some standard signals.
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