7 very practical Shell script examples!
The day before yesterday, I saw a reader sharing several Shell script example topics in the group. I simply saw them. Why not write and consolidate the basic knowledge, as follows:
1. Concurrently obtain the hostname from several machines, record the time spent returning the information, and redirect to a file hostname Txt, output the CPU info ...
Posted by alecapone on Sun, 16 Jan 2022 01:39:14 +0100
linux Find File Techniques
Tools find, locate, grep, whereis/which, type.
find File Finder
find supports a variety of parameters. Here are some of the commonly used parameters. For more information, see: find command
Common Conditions
-type Type parameters
f Normal File
l Symbolic Connection
d Catalog
c Character Device
b Block Device
s socket
p Fifo
-inam ...
Posted by twinzen on Mon, 10 Jan 2022 18:17:38 +0100
mysql database backup operation
1. Backup data with mysqldump command
MySQL provides a convenient tool mysqldump for exporting database data and files from the command line. We can directly export the database content through the command line. First, let's briefly understand the usage of mysqldump command:
mysqldump -u root -p --databases Database 1 database 2 > xxx.sql
...
Posted by tapos on Mon, 10 Jan 2022 03:47:03 +0100
Java Code Audit Java Foundation
0. Preface
Two suggestions:
~go B Station Find Java Learn the course once
~I understand that I must follow the instructions and do more than once
This article summarizes more categories, not suitable for beginners, beginners suggest to go B Stop learning.
1. Overview and Basic Grammar
Introduction to 1.1 java language
Codes a ...
Posted by quecoder on Fri, 07 Jan 2022 18:39:42 +0100
Linux basic operation notes
Common commands
Enter directory
cd /usr #Enter the usr directory
View catalog file
ls #View all files in the current directory
ll #View the details, permissions, size, time, etc. of all files in the current directory
#ll command = = ls -l command
ls Directory name #ls + directory name, you can view all files in the specified directory
...
Posted by Pavel_Nedved on Fri, 07 Jan 2022 09:19:56 +0100
systemd log for log management, persistence settings, journal, systemd journal, view log (journalctl)
System D uniformly manages the startup logs of all units. You can view all relevant logs (kernel log and application log) with only one command of journalctl. The configuration file for logs is / etc / Systemd / journald conf.
Persistent systemd log
CentOS 7 can use SYSTEMd journal as the log Center Library (generating log folders). Th ...
Posted by AXiSS on Fri, 07 Jan 2022 02:52:04 +0100
Learn Shell basic programming efficiently in two days (praise)
preface
Try not to use all the questions. The commands tail, cat, grep and awk are directly executed to get the results. They are all programmed with bash shell statements, so the program is the most efficient
The following is my method of learning Shell for reference
1. Take half a day to see the basic usage: Shell tutorial - rookie tut ...
Posted by blr32 on Wed, 05 Jan 2022 17:24:22 +0100
Linux users and groups
Why introduce users and groups? Security - permission management (which files can be read and written by a user and which processes can be started by a user) - Resource Management (storage resources, IO, CPU resources)
[root@localhost ~]# id root
uid=0(root) gid=0(root) group=0(root)
Each user has a unique uid and gid
A user can have differen ...
Posted by amob005 on Tue, 04 Jan 2022 10:53:34 +0100
Shell Scripting Basic Grammar Tutorial
Preface
_This paper simply records the knowledge about Shell scripting. Original video directions: Original video Click here
1. Shell Variables
(1) Definition:
Variable name = variable value A=hello # Define variable A whose value is hello
echo $A # Call the variable, note the money, "$"
Be careful:
Call another ...
Posted by rupturedtoad on Tue, 04 Jan 2022 07:16:14 +0100
Linux storage management
A. View disk devices
/proc/partitions
Question 1: how to add a new hard disk
virt-manager
Question 2: how to find files in the file system
find /mnt/ -name "*westos*"
find /mnt/ -name westosfile1
Question 3: set the depth to find the file
find /mnt -maxdepth 1 -name westosfile1
#The depth of the lookup file is 1 layer
find /mnt -mi ...
Posted by Scutterman on Mon, 03 Jan 2022 14:08:58 +0100