first thing to note is that iPhoto DOES keep files with duplicate file names so it may look like you have multiple copies of the same file.
[...deletia...]
exit terminal then go in to finder and open (or import) the newly created text file "photolist.txt" in to word or excel or BBedit or what ever other program you want to use to sort and then search for multilple instances of the filename.

NOTE: the ls comand is = LS in lowercase)

BBEdit/TextWrangler has a command to insert a folder listing into a text document. Try Edit->Insert->Folder listing

If you're hunting duplicates iPhoto should have warned you when you added them. Alternatively something like TidyUp! can help find all sorts of duplicate files. Finding duplicates by name and size usually shows up likely candidates.

http://www.hyperbolicsoftware.com/downloads.html#tu

Have fun,
Shay
--
=========================== Shay  Telfer ================================
 Perth, Western Australia   Technomancer  There are many worlds and many
 Opinions for hire              [POQ]     tales, but not much time
 http://public.xdi.org/=Shay    fnord     - Roland of Gilead