LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-12-2011, 04:47 PM   #1
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 128

Rep: Reputation: 5
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?
 
Old 01-13-2011, 10:20 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
How do you back up your data?
 
Old 01-13-2011, 01:47 PM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
Old 01-15-2011, 07:17 AM   #4
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 128

Original Poster
Rep: Reputation: 5
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.

Last edited by S. Chapelin; 01-15-2011 at 07:39 AM. Reason: Still thinking
 
Old 01-15-2011, 07:51 AM   #5
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 128

Original Poster
Rep: Reputation: 5
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.
 
Old 01-15-2011, 08:04 AM   #6
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 128

Original Poster
Rep: Reputation: 5
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?
 
Old 01-16-2011, 03:02 AM   #7
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 128

Original Poster
Rep: Reputation: 5
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort files in directories based on the files date... CharlieMike73 Programming 5 09-09-2009 11:04 PM
Trouble with making a bash script to read in different files and rename output files. rystke Linux - Software 1 05-07-2009 09:00 AM
Delete files for a particular changed date recursively? qwertyme Linux - Newbie 5 01-23-2009 11:41 AM
all my text files have changed to realmedia files erikus Linux - General 2 12-28-2006 05:43 PM
Rename Files With Date Picture Taken On Command lonecrow Linux - General 1 10-30-2006 01:18 PM


All times are GMT -5. The time now is 01:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration