LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 03:47 PM   #1
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 144

Rep: Reputation: 6
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, 09:20 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

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

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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, 06:17 AM   #4
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 144

Original Poster
Rep: Reputation: 6
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 06:39 AM. Reason: Still thinking
 
Old 01-15-2011, 06:51 AM   #5
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 144

Original Poster
Rep: Reputation: 6
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, 07:04 AM   #6
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 144

Original Poster
Rep: Reputation: 6
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, 02:02 AM   #7
S. Chapelin
Member
 
Registered: Jan 2010
Location: Quebec
Posts: 144

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



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 10:04 PM
Trouble with making a bash script to read in different files and rename output files. rystke Linux - Software 1 05-07-2009 08:00 AM
Delete files for a particular changed date recursively? qwertyme Linux - Newbie 5 01-23-2009 10:41 AM
all my text files have changed to realmedia files erikus Linux - General 2 12-28-2006 04:43 PM
Rename Files With Date Picture Taken On Command lonecrow Linux - General 1 10-30-2006 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration