Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to quickly delete a large number of files in a directory under Linux system

Shulou Source: shulou.com Published: 2022-06-01 12:15:41 10月01日 Update

This article focuses on "how to quickly delete a large number of files under a certain directory under the Linux system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to quickly delete a large number of files under a certain directory under the Linux system.

All it takes is a command.

Ls * .log | xargs rm-f

Just kill a directory containing tens of thousands of files (/ var/log/samba), give it a try.

Note: you can also use rm-fr (path + files to be deleted).

At this point, I believe you have a deeper understanding of "how to quickly delete a large number of files under a certain directory under the Linux system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: File directory system content learning practical deeper interest command practicality practical simple operation method more friends website path channel query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei OPPO Reno MariaDB Microsoft