On 06/29/2015 08:26 AM, darktable-users-requ...@lists.sourceforge.net wrote:
> Date: Mon, 29 Jun 2015 08:25:55 -0700
> From:darkta...@911networks.com
> Subject: [Darktable-users] Screwed duplicates
> To:darktable-users@lists.sourceforge.net
> Message-ID:<20150629082555.6d3f1...@frogguski.911networks.com>
> Content-Type: text/plain; charset=US-ASCII
>
> Hi,
>
> I just created 1864 duplicates by mistake. I pressed Alt-0 to remove
> the single star rating to all the selected images and somehow DT
> created 1864 duplicates. That was fast, less then 30 secs to create
> so many duplicates.
>
> Now the problem:
>
> How do I delete all of these duplicates? (hopefully not one by one)
>
> -- sknahT vyS
Don't despair.  If you have not made any edits since this unfortunate 
duplication, you can use "find -newer" to identify all of the 
duplicates.  I sometimes use this approach to move just the most recent 
images from an SD card.

My command would look like this:

cp `find -newer <newest non-duplicate filename>` <destination>

Note the "newest" file is literally that - I don't know if there is a 
way to limit find to a particular extension.  One easy way to see which 
file meets your needs is "ls -ltr" - this will list your files by 
datestamp, with the newest at the bottom of the list.

Also those are backward single quote marks surrounding the find command, 
which tell the OS to evaluate that command and use the output from it as 
the source for the copy command.

And, of course, you would want to use 'rm' in place of 'cp'.  A less 
dangerous approach would be to create a new directory and use that as 
the destination, replacing 'cp' with 'mv'.  When you are satisfied that 
you are only destroying what you did not want in the first place, you 
and follow up with the 'rm'.

Good luck!
John Hill

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Darktable-users mailing list
Darktable-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-users

Reply via email to