Re: Finding Duplicate named files with exactly the same size
Re: Finding Duplicate named files with exactly the same size
- Subject: Re: Finding Duplicate named files with exactly the same size
- From: Jon Pugh <email@hidden>
- Date: Fri, 16 May 2003 21:11:05 -0700
At 11:10 AM -0500 5/16/03, Mielke, Gary R. (CGC) wrote:
>
I am looking for some help on a OSX finder script to find duplicate file
>
names on my hard drive. I would also like a log file created that shows
>
the file name and path to the duplicate files. I am trying to clean up
>
multiple backups to a hard drive.
I wouldn't use the Finder. It doesn't help you in this quest.
The unix geek in me thinks you could do something like this:
do shell script "ls -R / | sort > /filelist"
This does a file listing (ls) recursively start at your hard disk's root directory (that's /), and pipes (the | separator) that list to the sort command and then the sorted list gets written to a file named filelist (via the > separator). There's your log file. Duplicates will be right next to each other. Perhaps someone knows a way to suck the duplicates out of the file. I don't know how with just the shell commands.
You'll probably want some other options for ls and/or sort depending on how you think you can determine if two files with the same name are indeed the same.
This script would probably take a long time on any disk of substantial size and require administrator privileges to see all the files on your disk.
Good luck.
Jon
WiFi Speed Spray:
http://www.j-walk.com/blog/docs/wifispray.htm
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.