Prints the number of files when scanning is done.
[finddup.git] / finddup.1
1 .TH "FINDDUP" 1 "Mar 2010" "Francois Fleuret" "User Commands"
2
3 \" This man page was written by Francois Fleuret <francois@fleuret.org>
4 \" and is distributed under a Creative Commons Attribution-Share Alike
5 \" 3.0 License.
6
7 .SH "NAME"
8
9 finddup \- Find files common to two directories (or not)
10
11 .SH "SYNOPSIS"
12
13 \fBfinddup\fP [OPTION]... DIR1 [[and:|not:]DIR2]
14
15 .SH "DESCRIPTION"
16
17 With a single directory argument, \fBfinddup\fP prints the duplicated
18 files found in it.
19
20 With two directories, it prints either the files common to both DIR1
21 and DIR2 or, with the `not:' prefix, the ones present in DIR1 and not
22 in DIR2. The and: prefix is assumed by default and necessary only if
23 you have a directory name starting with `not:'.
24
25 This command compares files by first comparing their sizes, hence goes
26 reasonably fast.
27
28 When looking for identical files, \fBfinddup\fP associates a group ID
29 to every content, and prints it along the file names. Use the \fB-g\fP
30 to switch it off.
31
32 Note that
33 .B finddup DIR
34 is virtually the same as
35 .B finddup -i DIR DIR
36
37 .SH "OPTIONS"
38 .TP
39 \fB-h\fR, \fB--help\fR
40 display help and exit
41 .TP
42 \fB-d\fR, \fB--ignore-dots\fR
43 ignore files and directories starting with a dot
44 .TP
45 \fB-0\fR, \fB--ignore-empty\fR
46 ignore empty files
47 .TP
48 \fB-c\fR, \fB--hide-matchings\fR
49 do not show which files from DIR2 corresponds to files from DIR1
50 (hence, show only the files from DIR1 which have an identical twin in
51 DIR2)
52 .TP
53 \fB-g\fR, \fB--no-group-ids\fR
54 do not show the file group IDs
55 .TP
56 \fB-p\fR, \fB--show-progress\fR
57 show progress information in stderr
58 .TP
59 \fB-r\fR, \fB--real-paths\fR
60 show the real path of the files
61 .TP
62 \fB-i\fR, \fB--same-inodes-are-different\fR
63 files with same inode are considered as different
64 .TP
65 \fB-m\fR, \fB--md5\fR
66 use MD5 hashing (if compiled with the option)
67
68 .SH "BUGS"
69
70 None known, probably many. Valgrind does not complain though.
71
72 The MD5 hashing is not satisfactory. It is computed for a file only if
73 the said file has to be read fully for a comparison (i.e. two files
74 match and we have to read them completely).
75
76 Hence, in practice lot of partial MD5s are computed, which costs a lot
77 of cpu and is useless. This often hurts more than it helps. The only
78 case when it should really be useful is when you have plenty of
79 different files of same size, and lot of similar ones, which does not
80 happen often.
81
82 Forcing the files to be read fully so that the MD5s are properly
83 computed is not okay neither, since it would fully read certain files,
84 even if we will never need their MD5s.
85
86 Anyway, it has to be compiled in with 'make WITH_MD5=yes', and even in
87 that case it will be off by default
88
89 .SH "WISH LIST"
90
91 The format of the output should definitely be improved. Not clear how.
92
93 Their could be some fancy option to link two instances of the command
94 running on different machines to reduce network disk accesses. Again,
95 this may not help much, for the reason given above.
96
97 .SH "EXAMPLES"
98
99 .B finddup -p0d blah
100
101 .fi
102 List duplicated files in directory ./blah/, show a progress bar,
103 ignore empty files, and ignore files and directories starting with a
104 dot.
105
106 .P
107 .B finddup sources not:/mnt/backup
108
109 .fi
110 List all files found in \fB./sources/\fR which do not have
111 content-matching equivalent in \fB/mnt/backup/\fR.
112
113 .P
114 .B finddup -g tralala cuicui
115
116 .fi
117 List groups of files with same content which exist both in
118 \fB./tralala/\fR and \fB./cuicui/\fR. Do not show group IDs, instead
119 write an empty lines between groups of files of same content.
120
121 .SH "AUTHOR"
122
123 Written by Francois Fleuret <francois@fleuret.org> and distributed
124 under the terms of the GNU General Public License version 3 as
125 published by the Free Software Foundation. This is free software: you
126 are free to change and redistribute it. There is NO WARRANTY, to the
127 extent permitted by law.