Re: [CentOS] Compare directories and files including files content from both node1 and node2

2023-02-10 Thread Kaushal Shriyan
Thanks a lot Kenneth and Harshal for the reply. Appreciate it. On Fri, Feb 10, 2023 at 6:22 PM Kenneth Porter wrote: > On 2/9/2023 8:43 AM, Harshal Lakare wrote: > > 2) Use rsync to compare files between two node , if there is any > difference > > between source and destination then rsync will s

Re: [CentOS] Compare directories and files including files content from both node1 and node2

2023-02-10 Thread Kenneth Porter
On 2/9/2023 8:43 AM, Harshal Lakare wrote: 2) Use rsync to compare files between two node , if there is any difference between source and destination then rsync will sync differential file. Use --dry-run to do this non-destructively, with the verbose flag to list the differences. _

Re: [CentOS] Compare directories and files including files content from both node1 and node2

2023-02-09 Thread Harshal Lakare
In my opinion here is the options you have, 1) Use nfs to share same or identical file across the host. 2) Use rsync to compare files between two node , if there is any difference between source and destination then rsync will sync differential file. Hope it will help you Regarding, Harshal Laka

[CentOS] Compare directories and files including files content from both node1 and node2

2023-02-09 Thread Kaushal Shriyan
Hi, I am running CentOS Linux release 7.9.2009 (Core) on node1 and node2. Is there a way to compare both files and directories in web server document root -> /var/www/html/webservices residing on both node1 and node2 including the files content. It is to make sure that both nodes are having the s

Re: [CentOS] compare directories

2008-10-23 Thread MHR
On Thu, Oct 23, 2008 at 11:13 AM, Bill Campbell <[EMAIL PROTECTED]> wrote: > > That's certainly true, which is why my solution, and the one with > diff both sorted the find output before the comparison. > Oh, I thought I was just seeing double again. Oops! :-) mhr __

Re: [CentOS] compare directories

2008-10-23 Thread Bill Campbell
On Thu, Oct 23, 2008, MHR wrote: >On Thu, Oct 23, 2008 at 10:15 AM, Bill Campbell <[EMAIL PROTECTED]> wrote: >> >> A somewhat cleaner way of doing this is to use the ``comm'' >> command as it generates a straight list as opposed to diff which >> requires parsing the output. >> > >But comm also "req

Re: [CentOS] compare directories

2008-10-23 Thread MHR
On Thu, Oct 23, 2008 at 10:15 AM, Bill Campbell <[EMAIL PROTECTED]> wrote: > > A somewhat cleaner way of doing this is to use the ``comm'' > command as it generates a straight list as opposed to diff which > requires parsing the output. > But comm also "requires" that the data be sorted. Otherwis

Re: [CentOS] compare directories

2008-10-23 Thread Bill Campbell
On Thu, Oct 23, 2008, Bowie Bailey wrote: >David Hlácik wrote: >> Hello guys, >> >> I have two mirrors. I need to compare files and directories on both >> mirrors and as a result print list of those which are missing on >> mirror 2 >> >> What i did >> >> find /data > find.mirror1 >> >> find /

Re: [CentOS] compare directories

2008-10-23 Thread William L. Maltby
On Thu, 2008-10-23 at 11:53 +0200, David Hláčik wrote: > Hello guys, > > I have two mirrors. I need to compare files and directories on both > mirrors and as a result print list of those which are missing on > mirror 2 > > What i did > > find /data > find.mirror1 > > find /data > find.mirror2

RE: [CentOS] compare directories

2008-10-23 Thread Bowie Bailey
David Hlácik wrote: > Hello guys, > > I have two mirrors. I need to compare files and directories on both > mirrors and as a result print list of those which are missing on > mirror 2 > > What i did > > find /data > find.mirror1 > > find /data > find.mirror2 > > Now i need to get list of tho

Re: [CentOS] compare directories

2008-10-23 Thread Les Mikesell
David Hlác(ik wrote: Hello guys, I have two mirrors. I need to compare files and directories on both mirrors and as a result print list of those which are missing on mirror 2 What i did find /data > find.mirror1 find /data > find.mirror2 Now i need to get list of those directories which are

Re: [CentOS] compare directories

2008-10-23 Thread Mogens Kjaer
David Hláčik wrote: > Hello guys, > > I have two mirrors. I need to compare files and directories on both mirrors > and as a result print list of those which are missing on mirror 2 Can you use rsync with the -n switch (dryrun) to mirror from mirror 1 to mirror 2 and see what would be transferred

Re: [CentOS] compare directories

2008-10-23 Thread Luciano Rocha
On Thu, Oct 23, 2008 at 11:53:20AM +0200, David Hláčik wrote: > Hello guys, > > I have two mirrors. I need to compare files and directories on both mirrors > and as a result print list of those which are missing on mirror 2 > > What i did > > find /data > find.mirror1 > > find /data > find.mirr

[CentOS] compare directories

2008-10-23 Thread David Hláčik
Hello guys, I have two mirrors. I need to compare files and directories on both mirrors and as a result print list of those which are missing on mirror 2 What i did find /data > find.mirror1 find /data > find.mirror2 Now i need to get list of those directories which are missing in mirror1. Th