Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Commands to delete files in linux

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Introduction to the command to delete files under linux:

1. Open the Linux system and create an empty file and folder

2. Rm file name (function: delete files)

Prompt: whether to delete the file, enter yes

3. Rm * (function: delete all files under this path)

4. Rm-f file name (function: delete files, no longer ask whether to delete)

5. Rm-r folder (function: recursively delete folders)

6. Rm-rf files or directories (function: delete files to get recursive deletion of directories, most commonly used)

Example:

1. Delete folder instance: rm-rf / var/log/httpd/access will delete the / var/log/httpd/access directory and all files and folders under it

2. Delete file usage example: rm-f / var/log/httpd/access.log will forcibly delete the file / var/log/httpd/access.log

These are the details of how linux deletes files, please pay attention to other related articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report