fdupes | fdupes is a program for identifying duplicate files | File Utils library
kandi X-RAY | fdupes Summary
kandi X-RAY | fdupes Summary
fdupes is a program for identifying duplicate files residing within specified directories.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fdupes
fdupes Key Features
fdupes Examples and Code Snippets
Community Discussions
Trending Discussions on fdupes
QUESTION
If I have 2 files where one is:
...ANSWER
Answered 2020-Jul-03 at 11:24You can iterate over the a-files and search for the corresponding b-files:
QUESTION
I have two directories - A and B - that contain a bunch of photo files. Directory A is where I keep photos long-term, and the files inside are sequentially named "Photo-1.jpg, Photo-2.jpg, etc.".
Directory B is where I upload new photos to from my camera, and the naming convention is whatever the camera names the file. I figured out how to run some operations on Directory B to ensure everything is in .jpg format as needed (imagemagik convert), remove duplicate files (fdupes), etc.
My goal now is to move the files from B to A, and end up with the newly-added files in A sequentially named according to A's naming convention described above.
I know how to move the files into A, and then to batch rename everything in A after the new files have been added (which would theoretically occur every night), but I'm guessing there must be a more efficient way of moving the files from B to A without re-naming all 20,000+ photos every night, just because a few new files were added.
I guess my question is two parts - 1) I found a solution that works (us mv to rename all photos every night), is there any downside to this? and 2) If there is a downside and a more elegant method exists, can anyone help with a script that would look at whatever the highest number that exists in A, then re-name the files, appending onto that number, in B as they are moved over to A?
Thank you!
...ANSWER
Answered 2020-May-20 at 00:28This bash
script will only move and rename the new files from DiretoryB
into your DirectoryA
path. It also handles file names with spaces and/or any other odd characters in their name in DirectoryB
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fdupes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page