1./proc Directory
the Linux kernel provides a mechanism for accessing kernel internal data Structures and changing kernel settings at run time through the/proc file system . The proc file system is a pseudo-file system that only exists in memory and does not occupy external memory space. It provides an interface for accessing system kernel data in a file system manner.
Users and applications can get system information through proc, and can change certain parameters of the kernel.
Because the information of the system, such as the process, is dynamically changed, so when the user or application reads the proc file, the proc file system dynamically reads the required information from the system kernel and submits it. These files or subfolders listed below are not always present in your system, depending on your kernel configuration and the modules that are loaded.
In addition, there are three important directories under/proc: NET,SCSI and Sys. The SYS directory is writable and can be used to access or modify kernel parameters, while net and SCSI depend on the kernel configuration. For example, if the system does not support SCSI, the SCSI directory does not exist.
In addition to the above, there are a number of directories named, they are the process directory. Each process currently running in the system has a corresponding directory under/proc, with the PID number of the process as the directory name, which is the interface to read the process information. The self directory is the information interface of the read process itself and is a link.
command example: Cat/proc/meminfo
Cat/proc/version
Cat/proc/meminfo |grep Page
2.Linux the difference between cat and echo in Commands
1. To see what the content of a file is, you can use cat, such as cat/etc/reslov.conf, to show the specific contents of the file reslov.conf.
2. While Echo does not have such a function, he will display the contents of the echo behind as a string,
Like echo Hello, it shows hello;
such as Echo/etc/reslov.conf, will show/etc/reslov.conf
Learning notes-linux Operating system basics