Re: Consolidating? files
- From: rob <picodreamer@xxxxxxxxx>
- Date: Thu, 14 Jun 2007 20:37:17 -0000
On Jun 13, 10:06 pm, Matt Giwer <jul...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
rob wrote:
I have an issue that I'm sure has a fairly simple resolution but I am
too inexperienced to figure it out. Basically I have a number of
files spread across several folders and subfolders in my home
directory. Some of these files are duplicates of each other and some
files have completely different content but share the same filename.
What I am trying to do is consolidate all the files in a single folder
with no duplicates and no overwriting files that have the same name.
Does anyone have any ideas how I might go about this?
BTW I am running FC5.
Any help would be greatly appreciated.
There are certainly a dozen ways to do this.
Off the top of my head I would use inside each directory
mv -i * ../newdirectory/
to move them all to the new directory. -i asks if you want to overwrite a
filename. Always answer no.
Then
ls -ld directorya/* directoryb/* etc. >tempfile1
then
sort tempfile1 >tempfile2
Now tempfile2 will all the files with the same name clustere. Those which are
the same size can be assumed to be the same file or you can check by hand. Then
change the names of the duplicate names but different sizes and repeat the first
step.
It would be wise to backup all the directories before starting.
--
Taxes on cigarettes are to raise revenues from the addiction.
-- The Iron Webmaster, 3759
nizkorhttp://www.giwersworld.org/nizkook/nizkook.phtml
Old Testamenthttp://www.giwersworld.org/bible/ot.phtmla6
Matt,
Thanks very much for the suggestion. That sounds like exactly what
I'm looking for. Once I get home from work I'll give it a try.
(keeping fingers crossed)
v/r
Rob
.
- References:
- Consolidating? files
- From: rob
- Re: Consolidating? files
- From: Matt Giwer
- Consolidating? files
- Prev by Date: Re: Consolidating? files
- Next by Date: Mod_Rewrite
- Previous by thread: Re: Consolidating? files
- Next by thread: Mod_Rewrite
- Index(es):
Relevant Pages
|
|