Home > Operation and Maintenance > Linux Operation and Maintenance > What is the command to delete files and folders in Linux?

What is the command to delete files and folders in Linux?

WBOY
Release: 2023-05-16 23:01:10
forward
7156 people have browsed it

Linux command to delete files and folders

1. Delete file command:

rm -f file name

The file will be forcibly deleted without any prompt

Note:

Pay special attention when using rm -rf. There is no recycle bin in Linux. Delete carefully

. 2. Delete the folder and all files in the folder. Command:

rm -rf directory name

Among them:

-r: Downward recursive deletion

-f:Direct forcible deletion without any prompt

What is the command to delete files and folders in Linux?

The above is the detailed content of What is the command to delete files and folders in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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