[ale] Stumped-

David Hamm ale at spinnerdog.com
Thu Mar 11 13:21:34 EST 2010


Hi Dennis,

>From reading your original post it seems like you are using inverse technique 
to eliminate duplicate files based on content.   If you are trying to track 
down all the duplicate files in each clients directory I'd suggest fdupes.

Fdups will search a directory tree for duplicates by generating an MD5 sum of 
the contents of each file and offers options for dealing with duplicates.  It 
will produce a list, or even remove any duplicates and create links to the 
remaining file while preserving the file name.

HTH


On Thursday 11 March 2010 11:08:16 Dennis Ruzeski wrote:
> This looks pretty promising- Forgot about stat...
>
> On Thu, Mar 11, 2010 at 10:55 AM, Dave Weiner <davew at coyotetechnical.com> 
wrote:
> > Dennis Ruzeski wrote:
> >> The direction  I've been going in is to do something like this-
> >>
> >> for dir in `ls /client`
> >> do diff -s $dir/images $dir/movies |grep ^F |xargs ls -l
> >> done
> >
> > I would take a different, not quiet as brute force approach as this,
> > totally untested and off the top of my head.  Watch for line wraps.
> >
> > for dir in /client/*
> > do
> >  cd $dir/images
> >  for file in *
> >  do
> >  if [ -f ../movies/$file ]
> >  then
> >   if [ `stat --format="%s" $file` -ne `stat --format="%s"
> > ../movies/$file` ]
> >   then
> >    #do something here
> >   fi
> >  fi
> >  done
> >  cd ../movies
> >  for file in *
> >  do
> >  if [ -f ../images/$file ]
> >  then
> >   if [ `stat --format="%s" $file` -ne `stat --format="%s"
> > ../images/$file` ]
> >   then
> >    #do something here
> >   fi
> >  fi
> >  done
> > done
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo




More information about the Ale mailing list