Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #262995

How to compare contents of two folders against third one?

From "Alexander V. Makartsev" <avbetev@gmail.com>
Newsgroups linux.debian.user
Subject How to compare contents of two folders against third one?
Date 2023-11-01 16:10 +0100
Message-ID <Hvl10-2nGs-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello everyone.

I have a "/source-folder/" which contains very large tree of folders and 
files.
I've manually copied a set of folders and files from it to a 
"/destination-folder-one/" and
copied another set of folders and files to a "/destination-folder-two/".

Now, is there an effective way to compare combined contents of two 
folders "/destination-folder-one/" and
"/destination-folder-two/" against a "/source-folder/" to show if there 
is anything that was left out?

For now I've tried "diff" and "rsync" to accomplish this.
But diff apparently can't compare combined contents of two folders with 
another folder.

    $ diff -r /destination-folder-one/ /destination-folder-two/
    /source-folder/
    diff: extra operand '/source-folder/'
    diff: Try 'diff --help' for more information.


And rsync scans folders and files that are already exist inside both 
destination folders and "/source-folder/" and outputs nothing.

    $ rsync -r --size-only --dry-run /destination-folder-one/
    /destination-folder-two/ /source-folder/
    $


I could go on a wild chase to "ls" contents of both destination folders, 
concatenate the results, sort them somehow,
do the same to a source folder and compare the resulting list files. 
Also create test cases to check if results are reliable.
But before I do that, is there a better way to accomplish the task?
Maybe some parameter for diff or rsync that I missed or another utility?

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How to compare contents of two folders against third one? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-11-01 16:10 +0100
  Re: How to compare contents of two folders against third one? Nicolas George <george@nsup.org> - 2023-11-01 16:10 +0100
    Re: How to compare contents of two folders against third one? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-11-02 07:50 +0100
      Re: How to compare contents of two folders against third one? "Russell L. Harris" <russell@rlharris.org> - 2023-11-02 09:00 +0100
  Re: How to compare contents of two folders against third one? <tomas@tuxteam.de> - 2023-11-01 19:00 +0100
    How to compare one folder to one directory (was: How to compare contents of two folders against third one?) "Loris Bennett" <loris.bennett@fu-berlin.de> - 2023-11-02 08:20 +0100
      Re: How to compare one folder to one directory (was: How to compare  contents of two folders against third one?) Reco <recoverym4n@enotuniq.net> - 2023-11-02 08:50 +0100
      Re: How to compare one folder to one directory (was: How to compare  contents of two folders against third one?) <tomas@tuxteam.de> - 2023-11-02 09:00 +0100
        Re: How to compare one folder to one directory (was: How to compare  contents of two folders against third one?) Michael Kjörling <2695bd53d63c@ewoof.net> - 2023-11-02 09:50 +0100
          Re: How to compare one folder to one directory (was: How to compare  contents of two folders against third one?) Nicolas George <george@nsup.org> - 2023-11-02 10:00 +0100
            Re: How to compare one folder to one directory (was: How to   compare contents of two folders against third one?) yxcv@vienna.at - 2023-11-02 10:10 +0100
        Re: How to compare one folder to one directory John Hasler <john@sugarbit.com> - 2023-11-02 15:20 +0100
          Re: How to compare one folder to one directory <tomas@tuxteam.de> - 2023-11-02 15:30 +0100
            Re: How to compare one folder to one directory "Loris Bennett" <loris.bennett@fu-berlin.de> - 2023-11-02 16:20 +0100
              Re: How to compare one folder to one directory debian-user@howorth.org.uk - 2023-11-02 22:00 +0100
                Re: How to compare one folder to one directory Nicolas George <george@nsup.org> - 2023-11-02 22:10 +0100
              Re: How to compare one folder to one directory John Hasler <john@sugarbit.com> - 2023-11-03 03:50 +0100
                Re: How to compare one folder to one directory Greg Wooledge <greg@wooledge.org> - 2023-11-03 04:20 +0100
                On folders vs. directories and history [was: how to compare...] <tomas@tuxteam.de> - 2023-11-03 06:40 +0100
                Re: On folders vs. directories and history [was: how to compare...] Nicolas George <george@nsup.org> - 2023-11-03 08:50 +0100
                Re: On folders vs. directories and history [was: how to compare...] tomas@tuxteam.de - 2023-11-03 09:00 +0100
                Re: On folders vs. directories and history [was: how to compare...] John Hasler <john@sugarbit.com> - 2023-11-07 03:50 +0100
                Re: On folders vs. directories and history [was: how to compare...] <tomas@tuxteam.de> - 2023-11-07 06:40 +0100
                Re: On folders vs. directories and history [was: how to compare...] Tom Browder <tom.browder@gmail.com> - 2023-11-07 12:00 +0100
                Re: On folders vs. directories and history [was: how to compare...] "Loris Bennett" <loris.bennett@fu-berlin.de> - 2023-11-03 16:10 +0100
                Re: On folders vs. directories and history [was: how to compare...] Nicolas George <george@nsup.org> - 2023-11-03 16:20 +0100
                Re: On folders vs. directories and history [was: how to compare...] gene heskett <gheskett@shentel.net> - 2023-11-03 17:30 +0100
                Re: On folders vs. directories and history [was: how to compare...] "Loris Bennett" <loris.bennett@fu-berlin.de> - 2023-11-06 17:00 +0100
                Re: On folders vs. directories and history [was: how to compare...] Nicolas George <george@nsup.org> - 2023-11-06 17:10 +0100
                Re: On folders vs. directories and history [was: how to compare...] Curt <curty@free.fr> - 2023-11-06 18:20 +0100
                Re: [OFFTOPIC] On folders vs. directories and history [was: how to compare...] Stefan Monnier <monnier@iro.umontreal.ca> - 2023-11-03 16:40 +0100
                Re: [OFFTOPIC] On folders vs. directories and history [was: how to  compare...] <tomas@tuxteam.de> - 2023-11-03 18:40 +0100
                Re: [OFFTOPIC] On folders vs. directories and history [was: how to  compare...] John Hasler <john@sugarbit.com> - 2023-11-07 03:40 +0100
                Re: [OFFTOPIC] On folders vs. directories and history [was: how to  compare...] <tomas@tuxteam.de> - 2023-11-07 06:40 +0100
                Re: On folders vs. directories and history [was: how to compare...] <tomas@tuxteam.de> - 2023-11-03 18:30 +0100
                Re: On folders vs. directories and history [was: how to compare...] Curt <curty@free.fr> - 2023-11-03 18:30 +0100
                Re: On folders vs. directories and history "Thomas Schmitt" <scdbackup@gmx.net> - 2023-11-03 19:20 +0100
                Re: How to compare one folder to one directory Mihamina RKTMB <mihamina@atscom.io> - 2023-11-03 09:10 +0100
                Re: How to compare one folder to one directory "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-11-03 11:40 +0100
                Re: How to compare one folder to one directory Nicolas George <george@nsup.org> - 2023-11-03 11:50 +0100
                Re: How to compare one folder to one directory John Hasler <john@sugarbit.com> - 2023-11-07 04:20 +0100
      Re: How to compare one folder to one directory "Thomas Schmitt" <scdbackup@gmx.net> - 2023-11-02 10:20 +0100
      Re: How to compare one folder to one directory (was: How to compare  contents of two folders against third one?) Jeffrey Walton <noloader@gmail.com> - 2023-11-03 01:40 +0100
        On weeds and bikesheds [was: How to compare one folder to one  directory] <tomas@tuxteam.de> - 2023-11-03 06:30 +0100
    Re: How to compare contents of two folders against third one? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-11-02 08:40 +0100
      Re: How to compare contents of two folders against third one? Nicolas George <george@nsup.org> - 2023-11-02 08:50 +0100
      Re: How to compare contents of two folders against third one? <tomas@tuxteam.de> - 2023-11-02 09:10 +0100
        Re: How to compare contents of two folders against third one? "Alexander V. Makartsev" <avbetev@gmail.com> - 2023-11-02 10:50 +0100
          Re: How to compare contents of two folders against third one? Nicolas George <george@nsup.org> - 2023-11-02 11:00 +0100
          Re: How to compare contents of two folders against third one? <tomas@tuxteam.de> - 2023-11-02 11:10 +0100
          Re: How to compare contents of two folders against third one? Michel Verdier <mv524@free.fr> - 2023-11-02 16:20 +0100
    All the unicorns are dead on Linux (was: How to compare contents of  two folders against third one?) Jeffrey Walton <noloader@gmail.com> - 2023-11-03 17:00 +0100
      Re: All the unicorns are dead on Linux (was: How to compare contents  of two folders against third one?) tomas@tuxteam.de - 2023-11-03 18:50 +0100
      Re: All the unicorns are dead on Linux (was: How to compare contents  of two folders against third one?) Nicolas George <george@nsup.org> - 2023-11-03 19:20 +0100
      Re: All the unicorns are dead on Linux (was: How to compare contents  of two folders against third one?) Paul Duncan <paul.d@soi-team.org> - 2023-11-07 12:00 +0100
        Re: All the unicorns are dead on Linux John Hasler <john@sugarbit.com> - 2023-11-07 15:30 +0100
          Re: All the unicorns are dead on Linux Nicolas George <george@nsup.org> - 2023-11-07 15:40 +0100
            Re: All the unicorns are dead on Linux John Hasler <john@sugarbit.com> - 2023-11-07 17:00 +0100
              Re: All the unicorns are dead on Linux Nicolas George <george@nsup.org> - 2023-11-07 17:10 +0100
                Re: All the unicorns are dead on Linux Pocket <pocket@columbus.rr.com> - 2023-11-07 17:50 +0100
                Re: All the unicorns are dead on Linux David Wright <deblis@lionunicorn.co.uk> - 2023-11-07 20:00 +0100
                Re: All the unicorns are dead on Linux <tomas@tuxteam.de> - 2023-11-07 20:30 +0100
                Re: All the unicorns are dead on Linux Nicolas George <george@nsup.org> - 2023-11-07 20:50 +0100
              Re: All the unicorns are dead on Linux Dan Ritter <dsr@randomstring.org> - 2023-11-07 19:00 +0100
                Re: All the unicorns are dead on Linux <tomas@tuxteam.de> - 2023-11-07 20:40 +0100
                Re: All the unicorns are dead on Linux tomas@tuxteam.de - 2023-11-07 20:50 +0100
                Re: All the unicorns are dead on Linux Charles Curley <charlescurley@charlescurley.com> - 2023-11-07 22:30 +0100
                Re: All the unicorns are dead on Linux Jeffrey Walton <noloader@gmail.com> - 2023-11-07 22:30 +0100
                Re: All the unicorns are dead on Linux John Hasler <john@sugarbit.com> - 2023-11-07 23:00 +0100
                Re: All the unicorns are dead on Linux Karen Lewellen <klewellen@shellworld.net> - 2023-11-07 23:50 +0100
                Re: All the unicorns are dead on Linux Nicolas George <george@nsup.org> - 2023-11-07 23:00 +0100
                Re: All the unicorns are dead on Linux Nicolas George <george@nsup.org> - 2023-11-07 20:50 +0100
                Re: All the unicorns are dead on Linux Karen Lewellen <klewellen@shellworld.net> - 2023-11-07 21:00 +0100
                Re: All the unicorns are dead on Linux Dan Ritter <dsr@randomstring.org> - 2023-11-07 21:40 +0100
                Re: All the unicorns are dead on Linux Karen Lewellen <klewellen@shellworld.net> - 2023-11-07 22:00 +0100
                Re: All the unicorns are dead on Linux John Hasler <john@sugarbit.com> - 2023-11-07 22:10 +0100
                Re: All the unicorns are dead on Linux Pocket <pocket@columbus.rr.com> - 2023-11-08 01:00 +0100
                Re: All the unicorns are dead on Linux Stefan Monnier <monnier@iro.umontreal.ca> - 2023-11-08 13:40 +0100
                Re: All the unicorns are dead on Linux <tomas@tuxteam.de> - 2023-11-08 14:10 +0100
              Re: All the unicorns are dead on Linux gene heskett <gheskett@shentel.net> - 2023-11-07 21:30 +0100
          Re: All the unicorns are dead on Linux gene heskett <gheskett@shentel.net> - 2023-11-07 21:00 +0100

csiph-web