[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Sun Feb 6 12:49:19 2005 -->
- <!--x-from-r13: nneba ng cq.bet (nneba) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: 1107706782.995.4.camel@localhost -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Looking for duplicate photos -->
- <li><em>date</em>: Sun Feb 6 12:49:19 2005</li>
- <li><em>from</em>: aaron at pd.org (aaron)</li>
- <li><em>in-reply-to</em>: <<a href="msg00182.html">[email protected]</a>></li>
- <li><em>references</em>: <1107706782.995.4.camel@localhost> <<a href="msg00180.html">[email protected]</a>> <<a href="msg00182.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Looking for duplicate photos</li>
<a rel="nofollow" href="http://elonen.iki.fi/code/misc-notes/remove-duplicate-files/">http://elonen.iki.fi/code/misc-notes/remove-duplicate-files/</a>
On Sunday 06 February 2005 12:37, pras at cycloeastern.com wrote:
> Only couple of enhancements I would make is
>
> make ls --sort...
> to ls -ltr --sort as he said the pics might be nested in a directory.
>
> Also
>
> I would do 'chksum' and match that as well before the rm..
>
> Just my 2 cents
> -Prasanna Subash
>
>
> On Sun, Feb 06, 2005 at 11:51:23AM -0500, Jim Patterson wrote:
> > Trey,
> >
> > The following script is primitive, but I think it should work fine for
you.
> > If you name if del_dup.sh, then run it with:
> > ./del_dup.sh /photos /photos/* /photos/*/*
> >
> > It does not recurse automagicaly, but you can extend it with too much
> > work. Just take the top level directory and use find to locate all the
> > sub-directories. Then pass that list to ls. NOTE: you can not use
> > ls -R since that breaks each directory into seperate sections.
> >
> > Jim P.
> >
> > #! /bin/sh
> >
> > oldsize="-"
> > oldfile="-"
> >
> > for f in `ls --sort=size $*`
> > do
> > dl=`ls -l "$f" | tr -s " "`
> > size=`echo $dl | cut -f 5 -d " "`
> > file=`echo $dl | cut -f 9 -d " "`
> >
> > if [ "$oldsize" = "$size" ]
> > then
> > if diff -q "$oldfile" "$file" >/dev/null
> > then
> > echo Deleting $file dup of $oldfile
> > rm "$file"
> > fi
> > else
> > oldsize=$size
> > oldfile=$file
> > fi
> > done
> >
> > On Sun, 06 Feb 2005 11:19:42 -0500, Trey Sizemore <trey at fastmail.fm>
wrote:
> > > I've got a number of photos from my digital camera stored on my machine
> > > and a number of them are duplicates. I was wondering if there was a
> > > script that would identify the duplicates and their locations so I can
> > > purge them to better organize and post. There is a /photos directory
> > > that itself contains both photos and other sub-directories so it would
> > > need to search both the /photos directory and all sub-directories within
> > > it.
> > >
> > > Am I wishfully thinking? I don't have experience with sed and awk
> > > (although I've used grep and pipes in the past) but this is beyond my
> > > limited understanding.
> > >
> > > Thanks.
> > >
> > > --
> > > Cheers,
> > > Trey
> > > ---
> > >
> > > "Men do not differ much about what things they will call evils;
> > > they differ enormously about what evils they will call excusable."
> > > -- GK Chesterton
> > >
> > > 11:15AM up 3:03, 0 users, load averages: 0.39, 0.43, 0.61
> > > FreeBSD salamander.thesizemores.net 5.3-STABLE i386
> > >
> > > _______________________________________________
> > > Ale mailing list
> > > Ale at ale.org
> > > <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
> > >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
>
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00185" href="msg00185.html">[ale] Looking for duplicate photos</a></strong>
<ul><li><em>From:</em> trey at fastmail.fm (Trey Sizemore)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00179" href="msg00179.html">[ale] Looking for duplicate photos</a></strong>
<ul><li><em>From:</em> trey at fastmail.fm (Trey Sizemore)</li></ul></li>
<li><strong><a name="00180" href="msg00180.html">[ale] Looking for duplicate photos</a></strong>
<ul><li><em>From:</em> unixdude at gmail.com (Jim Patterson)</li></ul></li>
<li><strong><a name="00182" href="msg00182.html">[ale] Looking for duplicate photos</a></strong>
<ul><li><em>From:</em> pras at cycloeastern.com (pras at cycloeastern.com)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00182.html">[ale] Looking for duplicate photos</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00184.html">[ale] Looking for duplicate photos</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00182.html">[ale] Looking for duplicate photos</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00185.html">[ale] Looking for duplicate photos</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00183"><strong>Date</strong></a></li>
<li><a href="threads.html#00183"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>