Quickest way to delete many small files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 12 Jun 2013 15:26:46 +0100
Pete Smith <pete at realisestudio.com> wrote:

> Hi
> 
> We've got a directory with approx 1 million files. Mac user ... grr
> 
> Is there a quick and dirty way to remove them?
> 
> I was going with:
> 
> ls | xargs rm
> 
> but maybe rsync -a --delete empty/ full/
> 
> would be less expensive?
> 
> This is on a distributed replicated volume.
> 
> Any pointers appreciated!

Admin question ;-)

mv <dir> <tempdirname>
mkdir <dir>
rm -rf <tempdirname>



-- 
Regards,
Stephan



[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux