|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a directory which contains photographs as jpgs. They are a bit mixed up - some sub-directories may contain files also in other sub-directories.
I want to create an archive of these pictures, and, rather than just copy the lot, including duplicates, I'd like to copy only one instance of each. What is the best way to do this? I've started to think along the lines of: # find . -print | xargs cksum | sort -u +0 -1 to get a list of filenames - but is there a better way? Regards, Il mittente di questo messaggio|The sender address of this non corrisponde ad un utente |message is not related to a real reale ma all'indirizzo fittizio|person but to a fake address of an di un sistema anonimizzatore |anonymous system Per maggiori informazioni |For more info https://www.mixmaster.it |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
George Orwell <nobody@mixmaster.it> writes:
> I want to create an archive of these pictures, and, rather than just copy the lot, including duplicates, I'd like to copy only one instance of each. > > What is the best way to do this? I've started to think along the lines of: > > # find . -print | xargs cksum | sort -u +0 -1 > > to get a list of filenames - but is there a better way? you can pipe it into awk, and only print files with a unique value. Md5sum (or sha1sum) is better than cksum |
|
![]() |
| Outils de la discussion | |
|
|