Re: [PATCH 2/4] hardlink: add --list-duplicates and --zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2024 at 07:19:30PM GMT, наб wrote:
> --list-duplicates codifies what everyone keeps re-implementing with
> find -exec b2sum or src:perforate's finddup or whatever.
> 
> hardlink already knows this, so make the data available thusly,
> in a format well-suited for pipeline processing
> (fixed-width key for uniq/cut/&c.,
>  tab delimiter for cut &a.,
>  -z for correct filename handling).

Why do we need a 16-byte discriminator? The list consists of absolute
paths, so it should be unique enough. This seems like an unusual
thing, as I cannot recall any other tool that uses something like
this.

> +*-l*, *--list-duplicates*::
> +Don't link anything, but list the absolute path of every duplicate file, one per line, preceded by a unique 16-byte discriminator and a tab.
...

> +				printf("%016zu\t%s%c", (size_t)other, l->path, opts.line_delim);

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux