Common commands for linux study notes 2

1.mkdir directory name to create a directory (folder)

   -p create recursively

 

2. cd to change directory

    cd / to change to the root directory    

    cd ~ switch to home

 

3.pwd display the current directory

 

4.rmdir deletes an empty directory

 

5. cp copy

cp [source directory file] (multiple requests or directories) [target directory]

-r copy directory

-p preserve the attributes of the source file  

Note: You can modify the file name while copying

 

6.mv cut, renamed 

Similar to cp, you can directly cut a directory or file, and you can change the name by cutting it to the same directory

 

7.rm delete files, directories

-r delete directory

-f force delete (do not ask to delete)

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327041600&siteId=291194637