What is the command to delete files in linux

王林
Release: 2020-05-15 14:20:34
Original
8197 people have browsed it

What is the command to delete files in linux

#The command to delete files in Linux is rm, which can also delete directories.

Parameter introduction:

-i Ask for confirmation one by one before deleting.

-f Even if the original file attribute is set to read-only, it will be deleted directly without confirming one by one.

-r Delete the files in the directory and below one by one.

Example:

1. Delete folder example:

rm -rf /var/log/httpd/access
Copy after login

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

2. Example of deleting files:

rm -f /var/log/httpd/access.log
Copy after login

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

Recommended tutorial:linux tutorial

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