Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution to the failure of batch deletion of files by rm command

Shulou Source: shulou.com Published: 2022-06-03 05:39:01 09月21日 Update

If there are too many files in the directory, if there are more than 10, 000 files, the rm command will not be able to delete files in batches.

Use the following methods:

Find. > tmpfile, # Delete the first line in tmpfile. Then: cat tmpfile | xargs rm-f

Tags: Files commands methods lines directories too many Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Linux macOS OPPO Reno