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

How to delete files in linux

王林
王林 Original
2020-03-12 16:12:30 3239browse

How to delete files in linux

Use the rm -rf directory name command.

-r means downward recursion. No matter how many levels of directories there are, deleting them all together.

-f means directly forcibly deleting them without any prompt.

(Recommended tutorial:linux tutorial)

Example:

Deleting the folder

rm -rf /var/log/httpd/access

will delete /var/log /httpd/access directory and all files and folders under it.

Deleting the file

rm -f /var/log/httpd/access.log

will forcefully delete the file /var/log/httpd/access.log.

Recommended related video tutorials:linux video tutorial

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