Home >Operation and Maintenance >CentOS >How to delete files in centos7

How to delete files in centos7

王林
王林Original
2020-03-14 17:07:2118841browse

How to delete files in centos7

First execute the sudo command or su command to enter the root mode;

Then use the rm (abbreviation for remove) command to delete the folder. If you are prompted that you cannot delete a Directory, then use the following command:

(Recommended learning video: linux video tutorial)

1. rm -r Directory/file name: Use recursive deletion.

2. rm -rf directory/file name: Completely delete the folder.

3. rm -ir directory/file name: interactively delete files.

Recommended related tutorials: CentOS usage tutorial

The above is the detailed content of How to delete files in centos7. 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