Circular statements of shell script (for, while, until)
1, for loop statement
1. Grammatical structure: (1) List loop (2) Loop without list (3) Class C style for loop
Format:
for Variable name in Value list
do
Command sequence
done
2. Usage:
Read different variable values to execute the same set of commands one by one
for loops are often used in scenarios where you already know ...
Posted by nightdesigns on Tue, 08 Feb 2022 19:18:32 +0100
Mounting process of ubi root file system under SigmaStar SSD202 openwrt system
For the introduction of UBI, please refer to the official documents
http://www.linux-mtd.infradead.org/doc/ubifs.html
The following is a brief introduction. UBIFS relies on the kernel UBI subsystem and runs on MTD devices. UBI can manage its own partitions in applications
For an introduction to SSD202, please refer to another blog post
At ...
Posted by Nymphetamine on Tue, 08 Feb 2022 19:13:41 +0100
Linux signal programming
For Linux, the actual signal is a soft interrupt, similar to the hard interrupt in MCU. Many important programs need to process the signal. Signal, which provides a method for Linux to deal with asynchronous events. For example, if the end user inputs ctrl+c to interrupt a program, it will stop a program through the signal mechanism.
Signal ov ...
Posted by Clarkey_Boy on Tue, 08 Feb 2022 19:00:09 +0100
Character device driver Foundation (II)
Working principle of the whole system:
Application layer - > API - > device driver - > Hardware
Sending appropriate instructions can perform different operations. This rule is specified by the device driver.These rules are displayed through the api and called by the application layerThe application layer transmits the corresponding ...
Posted by stormchaser1_1 on Tue, 08 Feb 2022 17:25:20 +0100
systemctl startup script configuration under CentOS 7
Sample script
[Unit] # Mainly service description
Description=test # Simple description service
After=network.target # Describes the service category, indicating that the service needs to be started after the network service is started
Before=xxx.service # Indicates that some services need to be started Before they are ...
Posted by MasK on Tue, 08 Feb 2022 16:59:40 +0100
Perfect, Redis can also cluster like this!!!
Introduction to Redis cluster
Redis is an open source key value storage system. Due to its outstanding performance, most Internet enterprises use it for server-side cache. Before version 3.0, Redis only supported single instance mode. Although it supported master-slave mode and sentinel mode deployment to solve single point of failure, now I ...
Posted by exec1 on Tue, 08 Feb 2022 12:04:37 +0100
iptables of Linux Firewall
preface
Firewall of Linux system - netfilter/iptables: IP packet filtering system, which is actually composed of two components, netfilter and iptables. It mainly works at the network layer for IP packets. It is reflected in the processing of IP address, port and other information in the packet.
1, Relationship between netfilter and iptable ...
Posted by meir4u on Tue, 08 Feb 2022 11:43:37 +0100
Implementation and analysis of Unix code example 1
#####1, Brief implementation of ls(1) command.
#include<apue.h>
#include<dirent.h>
int main(int argc,char *argv[])
{
DIR *dp;
struct dirent *dirp;
if(argc!=2)
err_quit("usage:ls directory_name");
if((dp=opendir(argv[1]))==NULL)
err_sys("can't open %s",argv[1]);
while((dirp=readdir(dp))!=NULL)
p ...
Posted by sONOCOOLO on Tue, 08 Feb 2022 09:57:42 +0100
Remote access and control
OpenSSH server
◾ SSH (Secure Shell) protocol
Is a secure channel protocolThe communication data is encrypted for remote management
◾ SSH profile
Service Name: sshdServer main program: / user/sbin/sshdServer configuration file: / etc/ssh/sshd_configClient configuration file: / etc/ssh/ssh_config
◾ Service listening options
Port ...
Posted by grilldan on Mon, 07 Feb 2022 22:39:05 +0100
Linux learning 8-CentOS deploys its own local django project
preface
How to deploy the django project written locally to the linux server so that other small partners can access it? Taking centos system as an example, this paper deploys the locally written django project to the linux server Environmental preparation:
Environmental preparation: 1. One Linux server, operating system: CentOS 7.4 64 bit 2. ...
Posted by ChemicalBliss on Mon, 07 Feb 2022 21:37:30 +0100