LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Application to eliminate doubles in files and rename changed files with date? (https://www.linuxquestions.org/questions/linux-software-2/application-to-eliminate-doubles-in-files-and-rename-changed-files-with-date-855905/)

S. Chapelin 01-12-2011 03:47 PM

Application to eliminate doubles in files and rename changed files with date?
 
Looking for a solution to a specific problem:
I have bought an external usb hard drive on which I back up my three computers every once in a while.
Space will quickly be used up.
I can't find that little bit of research that I need yesterday.
Here is what I would like to find:
An application that eliminates doubles in identical files and renames files that have changed by appending the last saved date yyyymmdd to the file name.
Does such an application already exist?

amani 01-13-2011 09:20 AM

How do you back up your data?

H_TeXMeX_H 01-13-2011 12:47 PM

For identical files I would use:
http://en.wikipedia.org/wiki/Fdupes
or those listed on there.

Then I would use a script for the rest.

S. Chapelin 01-15-2011 06:17 AM

On looking around, I find that the cp command already does a lot of what I need. I just have to tell it what to replace.
Also, I really have to think hard about what I really want to do. What to replace, what to rename, on what criteria. Before I erase something important by mistake.
Still working on it.
...
Files that never change, like photos, songs, etc, I want the copies eliminated.
Text files that have changed, I want them renamed with the date added at the end.
...
What I want is more of a library in the old sense, where I can go search my sources and old texts at will than a backup per se. Backups have the disadvantage that you have to search in each date a file lost among others. I would like to go into a directory and directly to a specific file at a certain date. Instead of going to date, then file, I would go to file, then date. Much better for me.

S. Chapelin 01-15-2011 06:51 AM

I do historical research. I have accumulated thousands of pictures, scans, images from the web, pdf and ebook documents, text files that I have modified. But also I have songs for when I work, bash scripts to make my work easier, emails from my friends, etc. etc. It is all very complex and hard to find when I need it. So ... I need a reservoir, a library on an external hard drive where I can keep all this safe while preserving space on the laptop where I keep the actual working papers, dictionnaries, references, etc.

S. Chapelin 01-15-2011 07:04 AM

My problem is common to a lot of people: students, programmers, 3d modelers, poets, etc.
Things that change, like text files.
Things that remain the same, like pictures.
A big pool of mess in which to search for what you need.
The need is there, but where is the programming genius to fill it?

S. Chapelin 01-16-2011 02:02 AM

Allright, so I can check the mtime of a file with:
Quote:

stat -c %y The\ Adventures\ of\ Huckleberry\ Finn.txt
2011-01-06 03:40:02.267070000 -0500
What really scares me is having to write a recursive function to test all files in all directories to see if the mtime has changed.
Surely someone must already have done that?


All times are GMT -5. The time now is 04:19 AM.