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 this is going slow, but the dir is not a dir on regular filesystem. It's a dir on a Lustre Filesystem of a cluster.
I'm running the rm
command on node A of the cluster which has the Lustre mounted, but the backend of the Lustre are 2 ZFS filesystems, one on node B and one on node C so all the networktraffic might be the cause of rm
going slow.
Does anyone know faster ways to remove the dir than my way ?
mv /path/to/the/dir /path/to/the/dir.DELETEME && nohup rm -rf /path/to/the/dir.DELETEME &
– Chris Davies Jun 12 '16 at 13:03rm
is slow because the filesystem is remote. POSIX doesn't provide any help beyondrm -rf
but a Lustre-specific technique for deleting the files faster would be handy. – Celada Jun 12 '16 at 15:17