Case 3. Adding multiple users in batches

The need to create users in batches is not very useful in production environments, but it is often seen in interviews. Requirement: 1) Batch increase of 100 users 2) User name user_01-user_100 3) Set a random password for all users. The password is 12 bits long and needs to contain upper and lower case letters and numbers. 4) and save the user ...

Posted on Fri, 19 Jul 2019 06:11:12 -0700 by hamza

Disk Management

Disk management 1. df command Unit introduction: Examples of df main parameters: 2. du command Examples of main parameters of du: 3. Disk partition fdisk command Examples of the main parameters of fdisk: 4. Disk formatting mke2fs command Examples of mke2fs main parameters: mkfs command Examples ...

Posted on Thu, 18 Jul 2019 22:27:42 -0700 by langemarkdesign

grep Learning of Three Swordsmen in Linux

grep Learning of Three Swordsmen in Linux grep Globally search a regular expression and print sh.5 1 #!/bin/bash 2 3 4 read -t 30 -p "Please input your name " name 5 echo KaTeX parse error: Expected 'EOF', got '\n' at position 100: ... echo -e "\̲n̲" 10 ...age" 11 12 13 read -t 30 ...

Posted on Thu, 18 Jul 2019 22:14:38 -0700 by matt_4013

Generation and cleanup of linux c zombie processes

Generation and cleanup of linuxc zombie processes What is a zombie process A zombie process is one in which the parent process has exited (the parent process has not waited (call wait/waitpid) and becomes a zombie process without process acceptance after dead. How does the zombie process come about When a process calls the exit command to end i ...

Posted on Wed, 17 Jul 2019 09:27:49 -0700 by zippers24

Understanding polymorphism of c + + from the perspective of c

1. Overview c + + is a hybrid programming language, which supports object-oriented and process-oriented, and mainly object-oriented. Among the three main characteristics of c + +: inheritance, encapsulation and polymorphism, polymorphism is the most difficult to understand. This paper will interpret the polymorphism of c + + from the perspectiv ...

Posted on Tue, 16 Jul 2019 12:40:13 -0700 by homerjay

Using Docker to Build LNMP Environment

The built environment is PHP 7.1.3 FPM & Nginx 1.11.10 & MySQL 5.7 Readers unfamiliar with Docker can refer to an earlier article: Docker Quick Start Configuring a simple LNMP environment Here, docker-compose is used. The configuration is as follows: docker-compose.yml version: "2" services: # Nginx 1.11.10: https://hub.docker.com/_ ...

Posted on Mon, 15 Jul 2019 16:47:37 -0700 by mrpickleman

Summary of String Interception Methods on Linux

    String interception on Linux can be broadly divided into two types, using commands to intercept and tools to intercept.The intercept methods are as follows:     a, #intercept, you can delete the left character, keep the right character     Start with the first </> on the left, delete & ...

Posted on Mon, 15 Jul 2019 09:04:37 -0700 by php4om

Deep and shallow Redis-redis Sentinel Cluster

Sentinel Sentinel Sentinel is Redis's high availability solution: Sentinel system composed of one or more Sentinel instances can monitor any number of master servers and all slave servers under these master servers, and automatically download the master servers when the monitored master server enters the offline state. A slave server under ...

Posted on Thu, 11 Jul 2019 14:05:01 -0700 by delorian

How to build yum warehouse and customize rpm package

Original works, reproduced please indicate the source. http://www.cnblogs.com/Csir/ My tutor - Long Wing When we deploy cluster automatically, we need to build yum warehouse and customize rpm packages in order to install all services quickly.   # Server1.# Retain the usual downloaded rpm packages first sed -i 's#keepcache=0#keepcache=1#g' /etc/ ...

Posted on Wed, 10 Jul 2019 12:01:00 -0700 by thom2002

Keyboard macros in emacs

The Chinese name of PING (Packet InterNet Groper) is Internet Packet Explorer, which is a tool used to check whether the network connection of another host system on the network is normal. The ping command works by sending an ICMP message to another host system on the network. If a message is received by the designated system, it will send the ...

Posted on Tue, 09 Jul 2019 13:58:57 -0700 by Wireless102