Linked Questions

1 vote
3 answers

delete millions of files within a directory [duplicate]

The other day I ran bleachbit on my system. I had enabled wipe disk space option in it. It took several hours and my disk space filled up completely (100GB or so). After waiting forever, I decided to ...
1 vote
4 answers

directory with 980MB meta data, millions of files, how to delete it? (ext3) [duplicate]

Possible Duplicate: rm on a directory with millions of files Hello, So I'm stuck with this directory: drwxrwxrwx 2 dan users 980M 2010-12-22 18:38 sessions2 The directories contents is small - ...
  • 151
39 votes
8 answers

Delete 10M+ files from ZFS, effectively

I have written a buggy program that has accidentally created about 30M files under /tmp. (The bug was introduced some weeks ago, and it was creating a couple of subdirectories per second.) I could ...
  • 719
26 votes
12 answers

Storing and backing up 10 million files on Linux

I run a website where about 10 million files (book covers) are stored in 3 levels of subdirectories, ranging [0-f]: 0/0/0/ 0/0/1/ ... f/f/f/ This leads to around 2400 files per directory, which is ...
  • 4,325
7 votes
5 answers

How to remove directory on NFS fileystem with an enormous number of files

A poorly tested program created a directory on an NFS share with an enormous number of files, which I need to remove. ls -ald /home/foo drwxrwxr-x 2 503 503 317582336 Jul 29 11:38 /home/foo The ...
user avatar
12 votes
3 answers

Shrink/reset directory size?

Is there a way to shrink a directory entry? My dovecot maildir directories have increased in size from the default 4096 to several megs, and it is messing with disk quotas. The only way that I have ...
  • 1,145
12 votes
3 answers

Removing files takes too long

Short version: rm -rf mydir, with mydir (recursively) containing 2.5 million files, takes about 12 hours on a mostly idle machine. More information: Most of the files being deleted are hard links to ...
0 votes
5 answers

How to delete massive files via ftp or ssh?

On my servers, one of the scripts that I have been using keeps creating the blank files at root and I haven't been noticed for more than over 6 months and now total files are created more than 500,000 ...
6 votes
2 answers

How to find biggest (in entries, not size) ext4 directory?

Ubuntu 10.04.3 LTS x86_64, I am seeing the following in /var/log/messages: EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index full! Relevant info from dumpe2fs: Filesystem features: ...
  • 1,733
1 vote
2 answers

How do I delete a directory that has many subdirectories?

I have a directory with many subdirectories. I tried doing rm -rf mydirectory but it was still running after 1 hour. I have tried getting the number of subdirectories with ls -l . | egrep -c '^-'...
  • 111
1 vote
1 answer

What is the fastest delete method for many directory on Linux

I have to remove many directory. but rm -r /data is so slow ( about some days) /data has /data/a/b/c/d/e/f/g/h .... many dirs Does anyone know?
-1 votes
1 answer

speeding up deleting a large directory by running rm -rf on multiple terminals

I have this very large directory that I'm deleting with : rm - rf . It is taking very long, so I opened up another terminal and try deleting the same directory with rm -rf parallely. Is this ...
0 votes
0 answers

Will running multiple rm command make deleting files faster?

I have 800GB of data to delete and I entered below command rm -rf /data On my process monitor I see rm command running but its slow. If I ran another rm -rf /data command will the deletion process ...
  • 1,043
0 votes
1 answer

How can I deal with a directory on an ext4 volume that has so many files ls won't work?

I setup a motion detection software on linux and in the process created a directory with so many jpg files in it that running "ls mydirectory" just hangs. How can I split the content into several ...
0 votes
1 answer

Huge /var/log directory inode in ext3 after creating and removing many files

I have Debian Jessie, /var/log on root partition of type ext3 (rw,relatime,data=ordered). Four days ago logrotate dumped tens of thousands files, this was fixed and files deleted. After this: # du -...