Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.
$ ln src/* dir
$ rm dir/*

If src/ contains a few hundred files, the rm operation takes many minutes. If I open the directory in Finder, I can see the files vanishing one by one. This operation used to be virtually instantaneous in Snow Leopard, but is excruciatingly slow in Lion. If I copy the files instead of hard-linking them, removing them is still instantaneous.

Can anybody tell me what has changed to warrant this slowness?

share|improve this question
    
I can't reproduce this here. rm takes hardly any time at all. Is another process accessing the drive at the same time? –  patrix Aug 14 '11 at 17:26

1 Answer 1

up vote 4 down vote accepted

I think I figured it out. It seems to be Mobile Time Machine that's causing the slowdown. Apparently it's dutifully taking a backup of the files while they're being deleted. If the files are "original", it can simply move them to the Time Machine vault, but if they're links it has to copy them instead, which takes much longer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.