The fastest rm command and one of the fastest cp commands
1–10 of 83 posts
Re: The fastest rm command and one of the fastest cp commands
#2Re: The fastest rm command and one of the fastest cp commands
#3Actually I'm on btrfs so reflink copy is like instant I think? I should test that better.
Re: The fastest rm command and one of the fastest cp commands
#4Re: The fastest rm command and one of the fastest cp commands
#5Re: The fastest rm command and one of the fastest cp commands
#6If you need a large sub tree gone, mv dir .old-dir && rm -r .old-dir & works pretty well. Faster even than an optimized parallel unlinker.
Re: The fastest rm command and one of the fastest cp commands
#7https://github.com/SUPERCILEX/fuc/tree/master/comparisons#re...
Re: The fastest rm command and one of the fastest cp commands
#8If you need a large sub tree gone, mv dir .old-dir && rm -r .old-dir & works pretty well. Faster even than an optimized parallel unlinker.
Re: The fastest rm command and one of the fastest cp commands
#9If you need a large sub tree gone, mv dir .old-dir && rm -r .old-dir & works pretty well. Faster even than an optimized parallel unlinker.
That’s pretty outside-the-box and fun.
Re: The fastest rm command and one of the fastest cp commands
#10 $ time rm -rf Xcode.app
real 0m39.850s
user 0m0.429s
sys 0m29.153s
$ time rmz Xcode.app
real 0m36.476s
user 0m1.468s
sys 1m59.916s
It's a little bit faster, but not by much. Despite claims that it runs in parallel, it seems like it really just hits unlink on many more cores and contends on the kernel's filesystem spinlocks rather than doing useful work. So the end result is that rm uses 70% CPU and rmz uses 400% CPU and they basically end up doing the same thing.(FWIW, I don't use rm when deleting Xcode anyways, because it takes long and I do it too often. When testing unxip I just have it write to a temporary APFS volume and wipe it in between runs, which takes all of 10 seconds.)