Coder Social home page Coder Social logo

Comments (5)

elmindreda avatar elmindreda commented on May 19, 2024

It'd be silly for duff to replicate all the options not only in find but all other file-finding tools. That's why you can use duff as a filter. There are even examples of this in the manpage. To use one of your examples above:

find -size +1G | duff

If your file names contain whitespace, you need to use null-termination:

find -size +1G -print0 | duff -0 | xargs -n1 -0 echo

The customizable header (-f) is intended to help with the building of pipes at the other end. For example, if you set it to just output the number of files in each cluster, you get data easily iterable from scripts. See the bundled join-duplicates.sh for an example of this.

from duff.

sarnobat avatar sarnobat commented on May 19, 2024

You're right, this is easily pipable. I'm closing this ticket.

I must have been thinking of some other non-pipable functionality. I do have one question (probably not supposed to be in this ticket) - how does duff buffer the list of files that are fed in from find? Is it by number of bytes, and does the shell control that rather than duff? What I do know is that duff doesn't buffer the entire input before beginning the duplicate detection - thankfully. Though as a consequence can't identify all duplicates.

from duff.

elmindreda avatar elmindreda commented on May 19, 2024

Duff processes files a little and performs an initial sort as they come in, but most of the work cannot be started until all files have been collected, exactly because it does report all duplicates.

from duff.

sarnobat avatar sarnobat commented on May 19, 2024

from duff.

elmindreda avatar elmindreda commented on May 19, 2024

The process_args function provides a nice high-level overview of what duff does and in what order.

from duff.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.