Linked Questions

11
votes
8answers
55k views

Faster way to delete large number of files [duplicate]

I have a directory where lots of cached files are getting generated very quickly. Since these are very small files, it is consuming all my inodes very quickly. Currently I am running the following ...
2
votes
1answer
109 views

Delete millions of files efficiently, without first generating a list of all files to be deleted [duplicate]

I've been trying to figure out how to delete millions of files from a mounted NAS drive. The OS I'm accessing it from is RHEL 7.6. The directory is actively being written to, with tens or hundreds ...
0
votes
2answers
143 views

how to delete files in folder with thousands of files [duplicate]

in the folder cd /var/log/hive I guess we have thundered of log files I say that because if I do under this folder ls -l then its stuck and only CNTRL C , will exit so I cant to vew all ...
1
vote
2answers
218 views

Deleting LARGE number of files (exec, loops..) [duplicate]

I have a very large number of files to delete, which go by the following format: esymac_logEvents.log.5_2017-Feb-06_02-39-17.Z_2017-Feb-08_02-39-14.Z_2017-Feb-09_02-39-14.Z_2017-Feb-11_02-39-11....
1
vote
0answers
121 views

Most efficient way of purging of 10TB data from SAN? [duplicate]

I want to purge storage data from SAN which accumulates to 10 TB. The OS is linux. The storage is mounted as mount-points on a system for which it is visible I was recommended by a friend to use ...
37
votes
6answers
17k views

Deleting billions of files from a directory while seeing the progress as well

I have a directory of 30 TB having billions of files in it which are formally all JPEG files. I am deleting each folder of files like this: sudo rm -rf bolands-mills-mhcptz This command just runs ...
50
votes
7answers
87k views

How do I recursively shred an entire directory tree?

I have a directory tree that I would like to shred with the Linux 'shred' utility. Unfortunately, shred has no -R option for recursive shredding. How can I shred an entire directory tree ...
18
votes
4answers
51k views

What's the fastest way to remove all files & subfolders in a directory? [duplicate]

One program created lots of nested sub-folders. I tried to use command rm -fr * to remove them all. But it's very slow. I'm wondering is there any faster way to delete them all?
15
votes
4answers
13k views

How can I delete a folder with lots of subfolders fast?

I have a folder with 266778 subfolders. How can I delete it? I have tried cd ~/.local/share/Trash/ sudo rm -rf * but it takes much time. After 1 minute 25 seconds real time and 0.072 seconds user ...
21
votes
1answer
12k views

iotop showing 1.5 MB/s of disk write, but all programs have 0.00 B/s

I don't understand iotop output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? The video was taken as I was deleting the content of a folder with a few millions ...
7
votes
2answers
19k views

recursive delete with sftp?

I have a host that I can only access with sftp, scp, and rsync-- no ssh. I have a large tree of directories that I want to delete, but my sftp client apparently does not support recursive rms or ...
2
votes
1answer
7k views

Remove everything within directory using for loop

I am trying to remove large amount of mails (mostly mail delivery failed) from my server using rm -rf /home/*/mail/new/* And I am getting -bash: /usr/bin/rm: Argument list too long I tried using ...
4
votes
3answers
1k views

Removing dirs with lots of tiny files on Lustre

I have a dir with a gigantic amount of very small files that I want to remove and simply removing the dir with rm -rf /path/to/the/dir is already taking multiple days. It might sound strange that ...
1
vote
0answers
1k views

Perl script to delete big directory

This blog gives different ways of deleting Big Directories and their relative times for deleting a directory with 500,000 files. The script using perl is reported to be fastest, which is given by cd ...
5
votes
4answers
319 views

Most efficient way to thin out a backup which uses hardlinks

I have a backup disk which contains hundreds of backups of the same machine from different dates. The backup was made with rsync and hardlinks, i.e. if a file doesn't change the backup script just ...

15 30 50 per page