jvirkki / dupd

CLI utility to find duplicate files
http://www.virkki.com/dupd
GNU General Public License v3.0
113 stars 16 forks source link

Test 49: /bin/rm: Argument list too long #19

Closed Freaky closed 6 years ago

Freaky commented 6 years ago

While this is harmless now I look at it, it's still distracting. How about reducing the rm and find combination to this:

find files3 -name "tmp.*" -print0 | xargs -0 rm

This will delete in big batches, without overflowing the argument list.

jvirkki commented 6 years ago

The command above fails on Solaris as -print0 and -0 options are not supported.

I'll go with this which worked on all the systems I have available to try dupd:

find files3 -name "tmp.*" | xargs rm -f