Skip to content

Commit

Permalink
fdupes-1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlopezroche authored and jobermayr committed Feb 10, 2000
1 parent 3936940 commit cc3df4d
Show file tree
Hide file tree
Showing 11 changed files with 763 additions and 98 deletions.
13 changes: 12 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,15 @@ Steven S. Dick <[email protected]>:
input on preserve prompt (author's note: modified
Steven's patch to handle input a bit differently).


Frank DENIS aka Jedi/Sector One aka DJ Chrysalis <[email protected]>:
- Provided patch to fix bug where program would crash when
files being scanned were named pipes or sockets.
- Warned against security risk resulting from the use of a
temporary file to store md5sum output. Suggested the use
of RSARef instead of md5sum (author's note: used L. Peter
Deutsch's MD5 message digest library instead of RSARef).
- Provided patch to fix problem where false duplicates would
be reported because of hard links. Unlike the symlinks
issue described in the documentation, these false
reports are not a threat to the data, just the link.
(author's note: modified patch for correctness).
27 changes: 21 additions & 6 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
Installation is extremely simple:
Installing fdupes
--------------------------------------------------------------------
To install the program, issue the following commands:

make fdupes
make install (as root)
su root
make install

This will install the program in /usr/local/bin. You may naturally
change this to a different location if you so desire.
This will install the program in /usr/local/bin. You may change this
to a different location by editing the Makefile. Please refer to
the Makefile for an explanation of compile-time options. If you're
having trouble compiling, please take a look at the Makefile.

UPGRADING NOTE: When upgrading from a version prior to 1.2, it should
be noted that the default installation directory for the fdupes man
page has changed from "/usr/man" to "/usr/local/man". If installing
to the default location you should delete the old man page before
proceeding. This file would be named "/usr/man/man1/fdupes.1".

A test directory has been included so you may familiarise yourself
with the way fdupes operates. You may test the program before
installing it by issuing a command such as "./fdupes testdir"
or "./fdupes -r testdir", just to name a couple of examples. Refer
to the documentation for information on valid options.

You may test the programm by running "make test" or by invoking
the included "runtest" shell script.
35 changes: 29 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
#
# INSTALLDIR indicates directory where program is to be installed.
# Suggested values are "/usr/local/bin" or "/usr/bin".
#
INSTALLDIR = /usr/local/bin
MANPAGEDIR = /usr/man
VERSION = 1.12

fdupes: fdupes.c
gcc fdupes.c -o fdupes -DVERSION=\"$(VERSION)\"
#
# MANPAGEDIR indicates directory where the fdupes man page is to be
# installed. Suggested values are "/usr/local/man" or "/usr/man".
#
MANPAGEDIR = /usr/local/man

test: fdupes
./runtest
#
# VERSION determines the program's version number.
#
VERSION = "1.20"

#
# To use the md5sum program for calculating signatures (instead of the
# built in MD5 message digest routines) uncomment the following
# line (try this if you're having trouble with built in code).
#
#EXTERNAL_MD5 = -DEXTERNAL_MD5=\"md5sum\"



#####################################################################
# no need to modify anything beyond this point #
#####################################################################

fdupes: fdupes.c md5/md5.c
gcc fdupes.c md5/md5.c -o fdupes -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5)

install: fdupes
cp fdupes $(INSTALLDIR)
Expand Down
34 changes: 17 additions & 17 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ within specified directories.

Usage
--------------------------------------------------------------------
Usage: fdupes [options] DIRECTORY...
fdupes [options] DIRECTORY...

-r --recurse include files residing in subdirectories
-q --quiet hide progress indicator
-1 --sameline list duplicates on a single line
-s --symlinks follow symlinks
-d --delete prompt user for files to preserve and delete all others
important: using this option together with -s or --symlinks
or when specifiying the same directory more than once
can lead to accidental data loss
-v --version display fdupes version
-h --help display this help message
-r --recurse include files residing in subdirectories
-q --quiet hide progress indicator
-1 --sameline list duplicates on a single line
-s --symlinks follow symlinks
-H --hardlinks normally, when two or more files point to the same
disk area they are treated as non-duplicates; this
option will reverse this behavior
-n --noempty exclude zero-length files from consideration
-d --delete prompt user for files to preserve and delete all others
important: under particular circumstances, data
may be lost when using this option together with -s
or --symlinks, or when specifying a particular
directory more than once; refer to the fdupes
documentation for additional information
-v --version display fdupes version
-h --help display this help message

Unless -1 or --sameline is specified, duplicate files are listed
together in groups, each file displayed on a separate line. The
Expand All @@ -35,11 +41,6 @@ duplicates, leading to data loss should a user preserve a file
without its "duplicate" (the file itself!).


Requirements
--------------------------------------------------------------------
FDUPES program requires md5sum.


Contact Information for Adrian Lopez
--------------------------------------------------------------------
email: [email protected]
Expand Down Expand Up @@ -67,4 +68,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3 changes: 2 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- think of something to do
- Fix problem where MD5 collisions will result in one of the
files not being registered (causing it to be ignored).

22 changes: 19 additions & 3 deletions fdupes.1
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ fdupes \- finds duplicate files in a given set of directories

.SH "DESCRIPTION"
Searches the given path for duplicate files. Such files are found by
comparing
.BR md5sum (1)
checksums and then a byte-by-byte comparison.
comparing file sizes and MD5 signatures, followed by a
byte-by-byte comparison.

.SH OPTIONS
.TP
Expand All @@ -31,6 +30,13 @@ list duplicates on a single line
.B -s --symlinks
follow symlinked directories
.TP
.B -H --hardlinks
normally, when two or more files point to the same disk area they are
treated as non-duplicates; this option will reverse this behavior
.TP
.B -n --noempty
exclude zero-length files from consideration
.TP
.B -d --delete
prompt user for files to preserve, deleting all others (see
.B CAVEATS
Expand All @@ -53,6 +59,15 @@ is specified, duplicate files are listed
together in groups, each file displayed on a separate line. The
groups are then separated from each other by blank lines.
.SH CAVEATS
If fdupes returns with an error message such as
.B fdupes: error invoking md5sum
it means the program has been compiled to use an external
program to calculate MD5 signatures (otherwise, fdupes uses
interal routines for this purpose), and an error has occurred
while attempting to execute it. If this is the case, the
specified program should be properly installed prior
to running fdupes.

When using
.B \-d
or
Expand All @@ -71,6 +86,7 @@ Furthermore, when specifying a particular directory more than
once, all files within that directory will be listed as their
own duplicates, leading to data loss should a user preserve a
file without its "duplicate" (the file itself!).

.SH AUTHOR
Adrian Lopez <[email protected]>

Loading

0 comments on commit cc3df4d

Please sign in to comment.