Read the keyword explanation chapter 1 of UNIX System Programming

Source: Internet
Author: User

This is the first time I read this book. I want to read it again and read it carefully. And find out the keywords you want to remember.

 

Release 1.01

Songsong sorting

 

 

Chapter 1: Basic UNIX knowledge

1. kernel :. "Kernel" refers to a system software that provides hardware abstraction layer, disk and file system control, multi-task, and other functions. A kernel is not a complete operating system. A complete Linux kernel-based operating system is called Linux or GNU/Linux.

 

The hardware abstraction layer is the interface layer between the operating system kernel and the hardware circuit. It aims to abstract the hardware. It hides the hardware interface details of a specific platform, provides a virtual hardware platform for the operating system, so that it has hardware independence and can be transplanted on multiple platforms. From the perspective of software and hardware testing, software and hardware testing can be completed based on the hardware abstraction layer, making it possible to perform software and hardware testing in parallel.

 

A file in a Linux File System (a hierarchical structure) is a collection of data. A file system contains not only the data in the file but also the structure of the file system, all files, directories, soft connections, and file protection information seen by Linux users and programs are stored. Link: Linux File structure.

 

2. Shell is commonly known as shell (used to distinguish it from core). It refers to the software (command parser) that provides the user interface ). This parameter is used by commandand later cmd.exe in dos. It receives user commands and calls corresponding applications.

It is also a programming language. As a command language, it interactively interprets and executes user-entered commands or automatically interprets and executes a series of pre-defined commands. As a programming language, it defines various variables and parameters, it also provides many control structures that are available in advanced languages, including loops and branches. (Common Linux Shell versions include bash and C. Bash is the abbreviation of Bourne-again shell) (input commands to shell. Generally, the interactive shell such as a terminal can also be used to write script files ).

 

3. POSIX indicates a portable operating system interface (POSIX ).

 

4. absolute path: Start from the root directory. Relative Path: the current path starts.

 

5 bytes ing input to song.txt command ls> song.txt (similar to PWD ).

 

6. execlp () searches for the file name that matches the parameter file from the directory indicated by the PATH environment variable, and then runs the file, then, the second parameter is used as the argv [0], argv [1]…, The last parameter must end with a null pointer. If a constant 0 is used to represent a null pointer, it must be forcibly converted to a character pointer; otherwise, it is interpreted as an integer parameter, if the length of an integer is different from that of char *, the actual parameter of the exec function will fail. If the function call is successful, the Code executed by the process itself will become the code for loading the program, and the code after execlp () will not be executed.

 

7. If the child process has ended when waitpid () is called, waitpid () will immediately

Returns the end status of the sub-process. The end status value of the sub-process is returned by the status parameter,

The process identifier of the child process is also returned. If you do not care about the end status value

The status parameter can be set to null.

 

 

8. CTRL + D file Terminator Ctrl + C interrupt key Ctrl + \ return key

Pending 《《《

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.