<>rm command
rm Commands come from English words remove Abbreviation of , Its function is to delete files or directories , You can delete multiple files at once , Or recursively delete the directory and all its sub files .
rm It's also a dangerous order , Be very careful when using , Especially for novices, we should pay more attention , If implemented rm -rf
/* Command will empty all files in the system , Can't even recover . Therefore, we must confirm which directory it is in again before execution , What files do you want to delete , After consideration, hit enter , Keep a clear head at all times .
Syntax format :rm [ parameter ] file
Parameter function
-f Force deletion ( No second inquiry )
-i Before deleting, the user will be asked whether to operate
-r/R Recursive deletion
-v Displays the detailed execution of the instruction
<> example
Delete a file , The second confirmation will be performed by default , Knock y Confirm
for example : delete abc.cfg
[root@localhost ~]# rm abc.cfg rm: Delete normal file "abc.cfg"?y [root@localhost ~]#
Delete a file , Forced operation does not require secondary confirmation
for example : delete efg.cfg
[root@localhost ~]# rm -f efg.cfg [root@localhost ~]#
Delete a directory and its subfiles or subdirectories , All forced deletion
for example : delete monster2 catalogue
[root@localhost ~]# rm -rf monster2 [root@localhost ~]#
Force deletion of all current working directories monster Directory at the beginning
[root@localhost ~]# rm -rf monster* [root@localhost ~]#
Force emptying of all files in the server system
Don't try if you don't want the system to be scrapped
rm -rf /*
Technology