Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #13153
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Jack Strangio <jackstrangio@yahoo.com> |
| Newsgroups | comp.os.linux.misc |
| Subject | Re: Compare 2 dir-TREES? |
| Date | Thu, 1 Jan 2015 03:31:30 GMT |
| Organization | North Star Horizon Builders Club |
| Lines | 41 |
| Message-ID | <nHHB4I.9Ft@yahoo.com> (permalink) |
| References | <pan.2015.01.01.02.56.21@gmail.com> |
| Injection-Info | mx02.eternal-september.org; posting-host="3e657bdea6b7aef1ac09b31dcca154f6"; logging-data="1931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+soWawAKwr60DSy4+wwgwpvzvPsXA77nY=" |
| X-Newsreader | TASS News Reader 3.7.2 jvs [linux] |
| Cancel-Lock | sha1:k3NhkTIRJaUNNN5gR1kbyXnBya0= |
| Xref | csiph.com comp.os.linux.misc:13153 |
Show key headers only | View raw
Unknown <dog@gmail.com> writes:
> I can't find how to do this common task!
> `du | wc -l` will show the NUMBER of files - I think?
>
> -> rsync --list-only /mnt/p15/usr/X11R6/DumyDirTstRsync
> /usr/X11R6/DumyDirTstRsync
> == drwxr-xr-x 4096 2014/12/31 18:46:24 DumyDirTstRsync
> == ! does NOT tell WHAT differences !!
>
> So: `rsync --list-only <Tree1> <Tree2>` <-- FAILS !!
>
> What am I doing wrong, for this simple/common task?
There are several ways. I use this quick n dirty but effective method:
to compare directory trees A and B -
cd /A
find . -type f | sort > /tmp/Afiles
cd /B
find . -type f | sort > /tmp/Bfiles
then to find the extra A files
diff /tmp/Afiles /tmp/Bfiles | grep '< ' > /tmp/Aextras
and to find the extra B files
diff /tmp/Afiles /tmp/Bfiles | grep '> ' > /tmp/Bextras
Jack
--
"I'm a home-loving girl. And that's where I wish I was."
"At home ..."
"Loving."
- Laugh-In, 1968
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Compare 2 dir-TREES? Unknown <dog@gmail.com> - 2015-01-01 02:49 +0000
Re: Compare 2 dir-TREES? Robert Heller <heller@deepsoft.com> - 2014-12-31 21:25 -0600
Re: Compare 2 dir-TREES? Jack Strangio <jackstrangio@yahoo.com> - 2015-01-01 03:31 +0000
Re: Compare 2 dir-TREES? Rich <rich@example.invalid> - 2015-01-02 21:39 +0000
csiph-web