Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Seeking recommendations for file consolidation
- Date: Sun, 20 Aug 2006 23:54:03 +0900
- From: Edward Middleton <edwardmiddleton@example.com>
- Subject: Re: [tlug] Seeking recommendations for file consolidation
- References: <44E44C72.4050509@example.com> <op.teg6be0p4j0um6@example.com>
On Fri, 2006-08-18 at 19:34 +0900, Zev Blut wrote: > I really am willing to provide the beer and pizza if Stephen is > willing to take part in realizing his git idea. Plus, it will give me > a good excuse to learn more about git ;-) The question I have of a git based approach is how does git determine the difference between a new binary file and a file that has been renamed and modified between versions, and furthermore how does it know that this file is not to be considered a new file. Perhaps there is a good way of doing this but the general problem (i.e. not ignoring corner cases) would appear to be unsolvable. Is this not the case? If you are just wanting duplicates hard-linked to the same inode, will this not work? #!/bin/bash # remove duplicates XXXSUM=/usr/bin/md5sum mkdir .sums for file in `find ./* -type f` do filesum=`${XXXSUM} $file|sed 's/^\([^ ][^ ]*\) .*$/\1/'` if [ -f .sums/$filesum ] then echo "$file duplicate." fi mv -u ${file} .sums/$filesum rm ${file} 2>>/dev/null ln .sums/$filesum ${file} done rm -rf .sums Edward
- References:
- [tlug] Seeking recommendations for file consolidation
- From: Dave M G
- Re: [tlug] Seeking recommendations for file consolidation
- From: Zev Blut
Home | Main Index | Thread Index
- Prev by Date: [tlug] Kickstart udev without restarting the computer
- Next by Date: Re: [tlug] Kickstart udev without restarting the computer
- Previous by thread: Re: [tlug] Seeking recommendations for file consolidation
- Next by thread: [tlug] Small detail - file icons
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links