Use of udev and mdev under linux

There are three kinds of device file systems under linux: devfs, udev and mdev. 1, devfs devfs was introduced by Linux 2.4 kernel, which was highly praised by many engineers. Its emergence enables device drivers to manage their own device files independently. Specifically, devfs has the following advantages: 1. You can create a device file in t ...

Posted by glennn3 on Sat, 21 May 2022 07:48:07 +0300

Redis data type (hash type)

hash type and operation ① Overview The hash type in Redis can be understood as a map container with String Key and String Value, so the hash type is suitable for storing value object information. Such as Username, Password or Age. Even if there are only a few fields in the hash, its data only takes up a small amount of disk space. Each ha ...

Posted by daniel_grant on Sat, 21 May 2022 04:01:06 +0300

Common Linux operations

Common Linux operations   1. Run sh file The first method: First you have to open a terminal. Then enter sudo su Then enter the password. This has achieved root User permissions. Then find the fileFirst, check whether the file has execution permission. If not, change the execution permission of the file, and then carry out the remaining op ...

Posted by olko on Fri, 20 May 2022 08:50:27 +0300

Shell script integer value comparison, logic test, if statement

1. Conditional test operation [conditional expression] (1) document test[file or directory]-d: Whether the directory is directory (test) -e: Test whether the directory or file exists (Exist) -f: Test whether it is a file -r: Test whether the current user has permission to read, -w: Test whether the current user has permission to write -x: T ...

Posted by Sneo on Fri, 20 May 2022 07:41:43 +0300

Connecting MySQL database with Linux (C + +)

1, Environmental installation The first is the installation of MySQL, which is directly installed only with apt get command (this method is recommended here, because it does not need to link the relevant path when compiling later programs) sudo apt-get install mysql-server After my installation, the relevant header files and dynamic lib ...

Posted by posidon on Fri, 20 May 2022 01:31:35 +0300

Use chroot to restrict SFTP users to the home directory

In this tutorial, we will discuss how to restrict SFTP users to their home directory or specific directory. This means that users can only access their respective home directories, not the entire file system. It is important to restrict users' home directories, especially in a shared server environment, so that unauthorized users will not pee ...

Posted by wih on Thu, 19 May 2022 14:27:23 +0300

LINUX core command combat summary I - shutdown, restart and logout commands

1. Shutdown, restart and logout commands 1.1. Shutdown, restart and logout commands [syntax format] shutdown [OPTION]... TIME [MESSAGE] shutdown [option]... time [news] Parameter description of Shutdown command Parameter options Explanation (focus on those with *) -r Restart the system instead of shutdown. T ...

Posted by AndyMoore on Wed, 18 May 2022 12:06:09 +0300

Software testing environment -- install MySQL on Linux (detailed), fine sorting

1, Foreword Several common ways to install software on Linux: Source code compilationDecompress the compressed package (generally tar.gz)Compiled installation package (RPM, DPKG, etc.)Online installation (YUM, APT, etc.) The convenience of the above methods increases in turn, but the versatility decreases in turn Delete the development ...

Posted by parkej60 on Wed, 18 May 2022 02:16:56 +0300

Realize the chat room based on Linux socket from 0 - realize the login and registration function of the chat room - 3

In the previous article, we have talked about how to build a multi-threaded server model, which can support multiple clients to connect to the server at the same time. In this article, we will realize multiple clients, how to register information with the server and realize the function of login. data structure Then, the example code of the pre ...

Posted by mharju on Tue, 17 May 2022 20:25:37 +0300

About CentOS 7, divide part of the home directory into the root directory

1, Basic concepts Cent0S 7 enables LVM2 (Logical Volume Manager) by default, and divides a hard disk of the machine into two areas sda1 and sda2, in which sda1 is mounted as a system disk / boot with a small amount of space; Sda2 acts as a physical volume and completely as a Logical Volume group VG(Volume Group) centos. In this Logica ...

Posted by bharanikumarphp on Tue, 17 May 2022 14:45:00 +0300