Duplicate files on the hard drive

Tom Dunlap

Here from the beginning
Administrator
My desktop is setup with two hard drives. The backup or D drive was in my old computer and has installed when this one was built. Since I'm not a great housekeeper I know that there are some/many duplicate files clogging things up.

Is there a program that can be run to sort the files and list duplicates? This would have to be completely automated because I'm not going to have the time or patience to do searches using wildcards. I know that I have some pictures stored in two different places. At times I find files saved in two places also.

Any help?
 
This should be a trivial task and if you weren't saddled by Windows it would be :)

Fetch the following stuff:

findutils-4.2.20-2.exe
grep-2.5.1a.exe
or grep.zip

The first has a couple of utilities for finding files and optionally working with them, the second is a utility for pulling strings of characters out of data streams and/or files.

Additionally, you should fetch sed-4.1.4.exe so as to be able to modify the output of find before you ever even see it. (I think find itself might be able to print its results in a myriad of ways, but for me it's just easier to pipe the results to sed; it's easier to remember the basic things each program does than to delve into the intricacies...)

The findutils package also contains "locate", which (if it will run on your Windows machine without fetching further software) creates a database of files on the entire machine. The database query is orders of magnitude faster than the mechanism Windows uses to "find" things. The formation of the database is about the same as what Windows does each time, but the database is usually set to be updated unattended sometime during the sleeping hours and it's only representative of the state of the filesystem(s) cataloged at that time.

Anyway, these utilities only touch the tip of the iceberg, so to speak, of what pretty much comes standard on any decent unix-like operating system and it's just another reason my hands always feel so cuffed anytime I sit in front of a Windows box.

Fetch the packages, install them, and if you need more help than the documentation offers, holler.

I'd probably, off the top of my head, do something like
<font class="small">Code:</font><hr /><pre>
cd \
find . ! -type d | sed 's/\(.*\)\\\(.*)/$2 $1/' | sort &gt; files
</pre><hr />
at the command prompt. Done once in the root of each drive. Then I would combine the files and "sort" them again (unless I was using a decent command interpreter like "bash" [which you can also fetch], wherein I would perform all the operations on all "drives" from one command and have only one output file.

Anyway, don't let this daunt you, Tom. Fetch the stuff and try it.

-----

Alternatively, you could fetch a bootable CD-ROM image of Ubuntu from http://ubuntu.com/ and they probably have a graphical utility to do all this. If not, you could open a terminal window and run the "ubdatedb" program, including your Windows drives/partitions, then just issue a command like
<font class="small">Code:</font><hr /><pre>
locate -i .jpg
</pre><hr />
to see every .jpg or .JPG file on your system.

A decent operating system actually makes computers actually useful :)
 
Tom, is the second hard drive just functioning as a backup for your data? If so, are you basically just trying to synchronize the two? There are a couple of decent free graphical windows apps that will do that, and can make keeping your files backed up properly very easy.

SyncBack Freeware is a good one. I use it on the Windows machines at work to backup our databases. It's fairly simple and works well: http://www.2brightsparks.com/downloads.html#freeware




For what it's worth, I run Ubuntu Linux on my home computer and I'm very happy with it.
 
Thanks for the direction!

Leon...yes..the second drive is basically a file cabinet with old info. I rarely put anything on it but I do pull things out which end up on my C drive.

In time, my PC unit will be all archived and my Mac will be the primary. In time...
 
Tom download.com has piles of little utility programs for niggly little things like this. Do a search there for 'duplicate file' and you'll get a bunch of results.

This one looks alright and it's free:

<font class="small">Code:</font><hr /><pre>http://www.download.com/Duplicate-File-Finder/3000-2248_4-10506816.html?tag=lst-0-1</pre><hr />


[ QUOTE ]
This should be a trivial task and if you weren't saddled by Windows it would be :)

[/ QUOTE ]

Ha!

kthxbye
 

New threads New posts

Back
Top Bottom