Home >Operation and Maintenance >Linux Operation and Maintenance >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
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
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!