Home>Article>Operation and Maintenance> How to delete files in centos
Use the rm command to delete files under Linux. The specific usage is as follows:
rm [选项] 文件
Recommended: "centos usage tutorial"
Option description:
-f -force Ignore non-existing files and force deletion without any prompt
-i --interactive Delete interactively
-r | -R --recursive Recursively delete all directories and files in the listed directory
-v --verbose Display the steps in detail
Example:
1. Regularly delete the a.txt file
[root]# rm a.txt
2. Forcibly delete the file.log file
[root]# rm -f file.log
3. Delete everything in the dirname directory
[root]# rm -ivrf dirname
Recommended learning
Linux video tutorial://m.sbmmt.com/course/list/33.html
The above is the detailed content of How to delete files in centos. For more information, please follow other related articles on the PHP Chinese website!