-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Istvan Gabor wrote:
I've read the synchronizer manual. I still don't know how I can delete duplicate files. Could you, please, give me a detailed description how to do it? I have a DVD with my backup and the hard drive. I want to remove the duplicated files only from the winchester.
Take a look at "diff" - it provides an option "-r" that traverses subdirectories. So if you use "diff -rsq <location of the directory on the mounted dvd> <location of the directory on disk>", you will get a list of files that only exist on one or the other side, that are identical or which files differ (without showing the difference). This list could then be piped into "grep" with some clever patterns and then be fed into "rm" to delete them (gotta love Unix). Example: $ find . . ./A ./A/fileC ./A/fileA ./A/fileD ./A/fileB ./B ./B/fileC ./B/fileA ./B/fileB $ diff -rsq A B Files A/fileA and B/fileA are identical Files A/fileB and B/fileB differ Files A/fileC and B/fileC are identical Only in A: fileD $ diff -rsq A B | grep "are identical" Files A/fileA and B/fileA are identical Files A/fileC and B/fileC are identical $ diff -rsq A B | grep "are identical" | cut -f2 -d" " A/fileA A/fileC (this of course assumes that file names don't include spaces, otherwise you may have to come up with a more elaborate script. Also, the "samefile" utility might come in handy, it compares files and detects duplicates, even if they have a different name. You can get a package from my home:LenzGr repository on the openSUSE build service. Bye, LenZ - -- - ------------------------------------------------------------------ Lenz Grimmer <lenz@grimmer.com> -o) [ICQ: 160767607 | Jabber: LenZGr@jabber.org] /\\ http://www.lenzg.org/ V_V -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHQuCzSVDhKrJykfIRAvX0AJ9+6ux4SVtnyVdSOAlDduPWWs1rpQCfSQBY IYuvqoti6xamfOL+t3Mi5hU= =TvFM -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org