Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to remove a folder with lots of files (namely millions of) efficiently. When I issue rm -rf folder/ it takes hours and I have to kill it. I'm wondering whether there is a magical way of doing this faster? Another thing is when I want to get the size of the folder with du -hs folder/ it also takes very very long time, I was never patient to wait for it and killed after several hours.

Thanks,

share|improve this question
    

1 Answer 1

From here:

rsync -a --delete ./emptyDirectoty/ ./hugeDirectory/
share|improve this answer
    
One note about that table: Did they mix user and system time? The first row command has elapsed 10.60 system 1.31 while the output says elapsed 12.42 user 1.31 system 10.60. –  ott-- Jun 4 '13 at 12:56
    
@ott--: Well spotted, I'm not sure what to make of that. The second row is even weirder 28.51, 14.46 vs 0.41, 14.46. –  Alix Axel Jun 4 '13 at 15:25
1  
I'd trust the output, the table needs the 3 colums Elapsed System and User with the correct values. –  ott-- Jun 4 '13 at 16:05
    
@ott--: I've sent the OP an email to see if he can clarify the results. –  Alix Axel Jun 4 '13 at 16:34

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.