From 776548b8b43cfaf709d8f501ebb697c16e8d7832 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 8 Mar 2010 20:21:23 +0100 Subject: [PATCH] Cosmetics. --- finddup.1 | 31 +++++++++++++++++++++++++++++-- finddup.c | 8 ++++---- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/finddup.1 b/finddup.1 index 54034b6..b6d758e 100644 --- a/finddup.1 +++ b/finddup.1 @@ -38,8 +38,35 @@ shows the real path of the files .SH "BUGS" -Every pair of different files with same content are listed, which -results in K^2 printed lines when K files are similar. +The display is not sorted by groups. + +.SH "EXAMPLES" +.nf +.B finddup -c blah something + +.fi +List files found in +.B ./blah/ +which have a matching file with exact same content in +.B ./something/ + +.P +.B finddup ./sources not:./backup + +.fi +List all files found in +.B ./sources/ +which do not have content-matching equivalent in +.B ./backup.sources + +.P +.B finddup -g ./tralala ./cuicui | sort -n + +.fi +List groups of files with same content which exist both in +.B ./tralala/ +and +.B ./cuicui/ .SH "AUTHOR" diff --git a/finddup.c b/finddup.c index cfef6be..514a676 100644 --- a/finddup.c +++ b/finddup.c @@ -23,7 +23,7 @@ * */ -#define VERSION_NUMBER "0.5" +#define VERSION_NUMBER "0.6" #define _BSD_SOURCE @@ -169,14 +169,14 @@ int same_content(struct file_with_size *f1, struct file_with_size *f2) { if(fd1 < 0) { fprintf(stderr, - "Can not open `%s' error: %s\n", + "Can not open \"%s\" error: %s\n", f1->filename, strerror(errno)); } if(fd2 < 0) { fprintf(stderr, - "Can not open `%s' error: %s\n", + "Can not open \"%s\" error: %s\n", f2->filename, strerror(errno)); } @@ -278,7 +278,7 @@ void start(const char *dirname1, const char *dirname2) { if(same_dir) { list2 = list1; } else { - fprintf(stderr, " %s ... ", dirname2); + fprintf(stderr, "%s ... ", dirname2); list2 = scan_directory(0, dirname2); } fprintf(stderr, "done.\n"); -- 2.39.5