[Discuss] fdupes opposite?
Murray Strome
wmstrome at shaw.ca
Fri Mar 14 12:36:44 PDT 2008
Steven Kurylo wrote:
>> I am looking for a utility that would be similar, except that instead of
>> finding and listing those files which are duplicated in a directory
>> tree, it would find those that are unique and list those.
>>
>> Does anyone know of a utility that does this?
>>
>
> It would be a quick shell script to run fdupes and then run the output
> through sort and uniq merged with the output of a normal directory
> listing. You'll be left with whatever fdupes didnt find.
>
I was trying something like what is given above. The problem with what I
have tried so far is:
fdupes -r {top directory}
gives each line in the form:
{top directory}/{subdirectories, if there are any}/{file name}
whereas,
ls -R1
just gives each line in the form
{file name}
with all directory information stripped out. I cannot find an option for
"ls" that would show the full directory path before the file names.
Maybe I am just missing it, or perhaps there is another command I could
use.
Thus, when you do the sort etc., it treats the names of files found with
fdupes to be different than those found with ls. By doing the ls -R1
(or -r1), you cannot tell which files are in the top directory and which
are lower down the tree.
Murray
More information about the Discuss
mailing list