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
WBOYforward
2023-05-16 23:01:107150browse

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!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete