Home>Article>Operation and Maintenance> How to delete files in centos

How to delete files in centos

尚
Original
2020-03-18 16:58:34 9483browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn