SUPERCILEX / fuc

Modern, performance focused unix commands
Apache License 2.0
340 stars 8 forks source link

Add -L / --dereference option #36

Closed noamraph closed 2 months ago

noamraph commented 2 months ago

Hi,

I added an equivalent to cp -L = cp --dereference option. I need this for my work, where I want to replace a cp command on NFS which takes forever, and it's using -L. I tried to make it behave like cp -L does: just treat symlinks as if they were really the files or directories they refer to. FWIW, in my work I was able to replace the cp -rL with cpz -L, and it succeeded, reducing the copying time from 49 minutes to 4 minutes!

WDYT?

noamraph commented 2 months ago

@SUPERCILEX I now managed to make the tests pass on all platforms. What do you think about this feature/PR?

SUPERCILEX commented 2 months ago

reducing the copying time from 49 minutes to 4 minutes

Holy shit! I'm very happy to see such a massive real world improvement, that's awesome.

Can you double check that my changes still work on your end? Then I'll merge.

noamraph commented 2 months ago

reducing the copying time from 49 minutes to 4 minutes

Holy shit! I'm very happy to see such a massive real world improvement, that's awesome.

Indeed! Thank you so much for the project!

Can you double check that my changes still work on your end? Then I'll merge.

I'm out of work now, I hope to test it on Sunday.

Also, your changes also tweak the code to my liking ;)

SUPERCILEX commented 2 months ago

Also, your changes also tweak the code to my liking ;)

Yay! I'll be waiting for your confirmation. :+1:

noamraph commented 2 months ago

@SUPERCILEX I confirm, it still works with our CI!

SUPERCILEX commented 2 months ago

Sweet!