Shell process control (if,else,case,while,for,until)

1. Conditional selection 1.1.if statement The grammar is very simple. #!/bin/bash MATH_SCORES="$1" NAME="$2" if [ -z "${MATH_SCORES}" ] then printf "The command requires that options have a scores.\n" printf "What's ths scores of your math? :" read MATH_SCORES fi if [ -z "${NAME}" ] then printf "The command requires that options ha ...

Posted on Sat, 22 Dec 2018 20:03:06 -0800 by coolpravin

Preliminary Study on tty-uart Driver Framework (2) uart_add_one_port

In the previous article, we analyzed an up-registration process of uart_driver, mainly something about tty. We learned that TTY registered a character device driver. We will call uart_port.ops.startup when user space open s, uart_port.ops.start_tx when user space write s, and we also know how to read data. However, these are all kernels to he ...

Posted on Sat, 22 Dec 2018 11:27:06 -0800 by verlen

Modify Linux SSH connection port and disable IP, install DDoS deflate

Testing system: centos7 Modify the connection port Modify configuration files vi /etc/ssh/sshd_config Remove port 22 comments and add a new port configuration port your_port_num Custom port selection is recommended for 10,000-bit ports (e.g. between 10,000 and 65,535) Do not delete port 22 directly to avoid forgetting that the new SSH por ...

Posted on Fri, 21 Dec 2018 10:24:05 -0800 by minds_gifts

device-mapper: multipath: Failing path recovery

https://yq.aliyun.com/articles/18067 ABSTRACT: Failure of multipath devices is caused by sector damage. The phenomenon is as follows: dmesg: device-mapper: multipath: Failing path 8:128. qla2xxx 0000:07:00. Failure of multipath devices due to sector damage. The phenomena are as follows: # dmesg : device-mapper: multipath: Failing path 8: ...

Posted on Thu, 20 Dec 2018 01:27:05 -0800 by Sekka

Building android Development Environment under ubuntu (4) Installing android Studio, sdk and jdk

[top] Build android Development Environment under ubuntu (4) Install android Studio, sdk and jdk (by Star Wuhan) <div class="article_manage clearfix"> <div class="article_r"> <span class="link_postdate">2016-08-15 23:49</span&g ...

Posted on Wed, 19 Dec 2018 16:06:05 -0800 by pluginbaby

11.28-31 Restricts a directory from parsing php, user_agent, php-related configuration

Access Control - Prohibit php parsing. note prohibits parsing PHP under a directory, which is very useful. When we do website security, this is used a lot. For example, some directories can upload files. In order to avoid the Trojan horse of uploaded files, we prohibit access under this directory to parse PHP. 1. Disable parsing PHP first < ...

Posted on Wed, 19 Dec 2018 03:57:04 -0800 by mohson

Creation of OpenCv-Mat Matrix (Image Container) and Detailed Explanation of CV_8UC1,CV_8UC2 and Other Parameters

(1) Detailed description of CV_8UC1,CV_8UC2 and other parameters when Mat matrix (image container) is created 1--Mat is not only a very useful image container class, but also a general matrix class. 2 -- There are many ways to create a Mat object. Let's first look at the source code of Mat Matrix/Image Container class in OpenCv: ...

Posted on Mon, 17 Dec 2018 03:18:04 -0800 by sstoveld

Chromium-cipd: golang net/http proxy agent

Recently, using Ubuntu 18.04 LTS desktop version, we downloaded chromium through foreign proxy, which hit many walls. Here we say that one of the cipd update failure errors, home using windows download also recurs: C:\myGit\depot_tools>.cipd_client.exe selfupdate -version git_revision:521b9b64770d3b43a221b1e2bd277687616adac ...

Posted on Sun, 16 Dec 2018 15:12:03 -0800 by InO

Linux i2c subsystem (1) _Write an i2c device driver manually

i2c bus is a very common board-level bus. Taking Linux 3.14.0 as a reference, this paper discusses the i2c driver model in Linux and uses this model to write a driver of mpu6050. Finally, the original data in mpu6050 is read out in the application layer. i2c subsystem framework The following figure is the schematic diagram of i2c driver framewo ...

Posted on Sat, 15 Dec 2018 14:00:04 -0800 by Jem

Detailed description of / etc/passwd and / etc/shadow files in linux system

In the linux operating system, every user in the / etc/passwd file has a corresponding record line, which records the basic attributes of the user. This file is readable to all users. And the / etc/shadow file, like his name, is a shadow of the passwd file. The record line in the / etc/shadow file corresponds to one of the / e ...

Posted on Thu, 13 Dec 2018 01:36:06 -0800 by MrPen