RafaĆ Radecki
2013-Aug-23 05:34 UTC
[CentOS] Fastest way of removing very large number of files?
Hi All. I currently have a problem on my backup server with very large number of small files in a large number of directories. I would like to delete them as fast as possible. Currently I use: rsync -a --delete /empty_directory/ dir_to_clean/ I've read that rsync will be faster than rm or find. Can you recommend something? I use an ext4 filesystem. Best regards, Rafal.
Frank Cox
2013-Aug-23 05:40 UTC
[CentOS] Fastest way of removing very large number of files?
On Fri, 23 Aug 2013 07:34:50 +0200 Rafa? Radecki wrote:> Can you recommend something? I use an ext4 filesystem.Without actually trying to to see, I suspect that a C program that calls remove() would probably be faster than just about anything else. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
James A. Peltier
2013-Aug-23 06:48 UTC
[CentOS] Fastest way of removing very large number of files?
----- Original Message ----- | Hi All. | | I currently have a problem on my backup server with very large number | of | small files in a large number of directories. I would like to delete | them | as fast as possible. Currently I use: | | rsync -a --delete /empty_directory/ dir_to_clean/ | | I've read that rsync will be faster than rm or find. | Can you recommend something? I use an ext4 filesystem. | | Best regards, | Rafal. If it's on a different file system than mkfs is the fastest. ;) -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices ?A successful person is one who can lay a solid foundation from the bricks others have thrown at them.? -David Brinkley via Luke Shaw