1
Can anyone help me diagnose why removing a directory would be so slow on my Mac?
$ du -hs mydir/
606M mydir/
$ find mydir/ -type f -print | wc -l
12720
$ date
Tue Sep 10 10:59:27 PDT 2013
$ rm -Rf mydir
$ date
Tue Sep 10 11:01:44 PDT 2013
This is my local machine, which is a pretty beefy Mac Pro with OS X 10.8. The directory has a lot of files and is pretty big, but over two minutes to delete it? Would this be expected?
Is there anyway I can figure out what, if anything, is making this process slow?
Thanks in advance!
Besides storage type, speed may also depend on filesystem. What filesystem type is the area with the files? bfs or local? a journaling filesystem has more overhead for deletions. – Rich Homolka – 2014-07-03T22:05:48.640
A lot of files to delete and the bottleneck is the harddrive. – justbrowsing – 2013-09-10T19:23:32.390
If you need to create and delete a lot of small files often, I'd suggest either a SSD or if you have sufficient RAM, storing the files in a ramdisk. – justbrowsing – 2013-09-10T19:25:04.490