How to delete files in centos

Release: 2020-03-18 16:58:34
Original
9555 people have browsed it

How to delete files in centos

Use the rm command to delete files under Linux. The specific usage is as follows:

rm [选项] 文件
Copy after login

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
Copy after login

2. Forcibly delete the file.log file

[root]# rm -f file.log
Copy after login

3. Delete everything in the dirname directory

[root]# rm -ivrf dirname
Copy after login

Recommended learning

Linux video tutorial: https://www.php.cn/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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!