The second lesson of MySQL database --------- understanding simple commands ----- quietly becoming big

Author's Foreword

 Welcome little cuties to come and learn from my gtiee Qin Boss (qin-laoda) - Gitee.com

——————————————————     ————————————

Table of contents

operating system
  1. desktop operating system
  2. server operating system
  3. embedded operating system
  4. mobile device operating system
Basic use of common Linux commands
  1. Why You Should Learn Linux Terminal Commands
  2. Commonly used Linux commands
  3. Absolute and Relative Paths
  4. command introduction
——————————————————————————————

operating system

Now the mainstream operating system is divided into four categories: desktop operating system , server operating system , embedded operating system , mobile device operation
system .

desktop operating system

Windows series :
      It is currently the desktop system with the largest user base, not one of them. It is characterized by simple desktop operation, and the software or applications installed on it must support image operation. And the supported applications are very rich, playing games, watching movies, editing videos, and daily office work can all be supported.
macOS
       This is Apple's exclusive desktop operating system. It is a system further encapsulated on Unix . It is the most suitable desktop system for program developers at present. Because it not only has almost the same underlying layer as Linux , but also has a lot of applications. Apart from coding, it is not a problem to watch videos and browse the web. The only downside is that you can't play games, because the Mac 's own design leads to poor heat dissipation, not a system defect.
Linux
      Yes, Linux also has a desktop operating system, such as Ubuntu . It's just that we usually only use Linux for program development, so we don't care about its desktop operating system.
Hongmeng :
       This is a desktop system independently developed by Huawei.

server operating system

Linux
    The virtual environment we installed is a type of server Linux operating system. It's just that our Linux is a computer, not a server level. When multiple similar Linux environments are connected, the data processing and storage capabilities are greatly enhanced, and it can be regarded as a server. Of course, if you plan to run a few scripts in your own system, it is no problem to insist that this is a server. Linux is also the most widely used server system in the Internet environment because it is safe, stable and free.
Windows Server
    Microsoft also has a server system developed by itself, but compared to Windows desktops, because it needs to be paid, it has not been very popular.

embedded operating system

    The most widely used embedded system is still Linux . For example, ATM machines, automatic cash registers, etc., they are all systems that are further packaged on the bottom layer of Linux .

mobile device operating system

      It can be simply understood as a mobile phone operating system. The current mobile operating systems are mainly divided into two types, IOS Apple and Android Android, and the bottom layer of Android is still developed by Opportunity Linux. Before 2010 , Symbian OS Symbian also appeared , because Nokia mobile phones were the same at that time. With the loss of Nokia's market, Symbian has gradually been forgotten.

Basic use of common Linux commands

        As a qualified programmer, we can't escape the fate of programming in the black window of Linux . Some people may question, why can't the code be completely written and uploaded to the server? Of course it is possible, but after all, there will be differences between the operating environment of your computer and the environment of the server. It is really cumbersome to modify and upload the code repeatedly in this way. Therefore, if there are only a small number of bugs , we can modify them directly on the server to avoid repeated download and upload operations.
      In actual work, almost all programmers are afraid of facing black windows. After all, there is such a mature graphical operating system now, and Linux command operations are indeed gradually marginalized. However, if you can master the basic operation commands proficiently, it will not only save you a lot of time in your future work, but also make you stand out among your peers, and it will be easier to win the favor of the big cows around you.

Commonly used Linux commands

无论是谁的要求,在任何情况下,一定不要执行 rm -rf /* 的命令
这条命令表示从根目录下递归删除所有文件,且你的系统都会被删除,请一定要注意问题的严重性!!!

 In order to let everyone see more clearly, I directly configured the desktop system

You can see that these files and folders (directories) are self-contained. I will demonstrate these commands one by one.

Absolute and Relative Paths

Absolute path : The path counted from the root directory is called an absolute path
Relative path : The path calculated from the current directory is called a relative path

 ls

ls

ls - a

ls -a

 ls -a is to display the hidden files. It can be seen that the hidden files start with ".", and I simply found some

ls -l  =====》ll

ls -l或者 ll

 displayed in more detail

ls -hl

ls -hl

 The -h parameter can be understood as converting the memory that matches the unit of k, that is, displaying the memory

   That is, h must be matched with l to be clearly displayed

ls file (or directory) -parameters

ls 文件(或者目录) -参数

 It can be seen that it is also possible to write

cd

cd 文件夹名

 cp switch folder   

pwd

pwd

 

 Display the current file location with an absolute path

mkdir (create folder)

mkdir 文件夹名字

 If you do not add parameters, you can only create folders one by one

-p

mkdir 文件路径 -p

Multiple folders can be created recursively

Remember that mkdir is used to create folders or directories 

touch (create file)

touch  文件名

 cp (copy paste files)

cp 要被复制的文件 粘贴的路径

 -i generate prompt statement

cp 要被复制的文件 粘贴的路径 -i

 This parameter is generally used to overwrite files. If it is used to copy and paste to a newly created file, there will be no prompt. It is generally used with the parameter v

-r

cp 要被复制的文件夹 粘贴的路径 -r

Recursively copy the files in the folder, that is, copy and paste a folder

-v 

cp 要被复制的文件 粘贴的路径 -iv

Used to show from which file to copy and paste to hello file 

mv (for moving files and directories)

mv 要被剪切的文件  移动到的路径 
mv 要被剪切的文件  移动到的路径 -iv

This is the same as cutting

This command also has two parameters, which are -i and -v, which are similar to the parameters of the cp command.

 It can be seen that when the file is moved to another file, it will be renamed, which can be understood as moving the a.py file to the directory of b, and then renaming it to c.py

 The effect of this picture is obvious, we can use this effect to rename

rm (delete)

Some cuties also found that this command occasionally appeared in the previous introduction. This command should be used with caution. Improper use will cause serious things.

-i  

rm 要删除的文件路径  -i

 A prompt appears

-f 

This is a parameter for mandatory deletion, no matter whether the file exists or not, it will not be demonstrated here

-r is used to delete all files in a folder (recursive deletion) without leaving an empty directory

 General deletion will add a -i parameter to prevent serious effects

-d is used to delete an empty directory

not demonstrated here

Finally, let me introduce the meaning of rm -rf /*, which can be understood as deleting all things, which cannot be recovered 

/*: match all the root directory

Summarize

Here is a brief introduction to the simple commands ls pwd cd rm mv cp and related parameters for the first-time database. If you don’t understand, you can chat with me privately.

Guess you like

Origin blog.csdn.net/m0_69984273/article/details/131505982