[Gluster-users] Quickest way to delete many small files

Pablo paa.listas at gmail.com
Fri Jun 14 18:10:48 UTC 2013

Be careful, I had made a big mistake here. 'mktemp -d' creates a 
directory in /tmp, and, surely, it is another file system. So 'mv' will 
just 'cp'. So ${tempdirname} should be in the some file system as <dir>


El 12/06/2013 08:16 p.m., Liam Slusser escribió:
> So combining the two approaches I think that this may be a better 
> solution?
> tempdirname=`mktemp -d`
> mv <dir> $tempdirname
> mkdir <dir>
> # rm -rf <tempdirname>
> mkdir empty
> rsync -a --delete empty/ $tempdirname
> rmdir empty $tempdirname
> Regards,
> Pablo.

More information about the Gluster-users mailing list