I'm trying to figure out if a file has changed since the last rsync call. I use the following command line: rsync -cvv /mnt/xxx/vol1/dbase/100/kunden.dbf /mnt/label | grep "^total: " | sed -e 's/.* data=//' This gives a 0 if the file is unchanged and the file size if the file has changed. Adding the "dry-run" option "n" to the command line always gives a 0. I wonder if this is a expected behaviour? -- Claas Hilbrecht http://www.jucs-kramkiste.de
The dry run was successful, and transferred 0 bytes. The dry run is for a quick check, and will show what objects, if any, would be transferred in a real run, not exactly how many bytes would be transferred. Perhaps a --write-batch in a dry run could create the batch files, and you could just wc them. Tim Conway Unix System Administration Contractor - IBM Global Services desk:3032734776 conway@us.ibm.com I'm trying to figure out if a file has changed since the last rsync call. I use the following command line: rsync -cvv /mnt/xxx/vol1/dbase/100/kunden.dbf /mnt/label | grep "^total: " | sed -e 's/.* data=//' This gives a 0 if the file is unchanged and the file size if the file has changed. Adding the "dry-run" option "n" to the command line always gives a 0. I wonder if this is a expected behaviour?
Dave.Turner@VerizonWireless.com
2004-May-11 15:07 UTC
rsync output -vv differs with dry-run option
I've noticed a difference between the dry-run and normal execution as well using /usr/local/bin/rsync -avrnz --exclude-from=/davet/rsync.webmstr1 --stats webmstr@primey::webmstr1 /export/home/webmstr. I'm not clear why, but it appears as if the dry run method, using -n, is not reporting all the files that are actually effected. I'm basing this on the report that rsync provides and am wondering if the -n only checks for files that are actually going to be transferred while the -avrn report includes empty diretories that will be created on the client side? My two cents... Thanks, Dave -----Original Message----- From: rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org [mailto:rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org]On Behalf Of Claas Hilbrecht Sent: Tuesday, May 11, 2004 7:49 AM To: rsync@lists.samba.org Subject: rsync output -vv differs with dry-run option I'm trying to figure out if a file has changed since the last rsync call. I use the following command line: rsync -cvv /mnt/xxx/vol1/dbase/100/kunden.dbf /mnt/label | grep "^total: " | sed -e 's/.* data=//' This gives a 0 if the file is unchanged and the file size if the file has changed. Adding the "dry-run" option "n" to the command line always gives a 0. I wonder if this is a expected behaviour? -- Claas Hilbrecht http://www.jucs-kramkiste.de -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Dave.Turner@VerizonWireless.com
2004-May-11 15:13 UTC
rsync output -vv differs with dry-run option
Correction: The options I'm comparing are -avr and -avrn. I meant that I'm getting a different report with the -n compared to without -n. Sorry... Thanks, Dave -----Original Message----- From: rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org [mailto:rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org]On Behalf Of Dave.Turner@VerizonWireless.com Sent: Tuesday, May 11, 2004 11:06 AM To: rsync@lists.samba.org Subject: RE: rsync output -vv differs with dry-run option I've noticed a difference between the dry-run and normal execution as well using /usr/local/bin/rsync -avrnz --exclude-from=/davet/rsync.webmstr1 --stats webmstr@primey::webmstr1 /export/home/webmstr. I'm not clear why, but it appears as if the dry run method, using -n, is not reporting all the files that are actually effected. I'm basing this on the report that rsync provides and am wondering if the -n only checks for files that are actually going to be transferred while the -avrn report includes empty diretories that will be created on the client side? My two cents... Thanks, Dave -----Original Message----- From: rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org [mailto:rsync-bounces+dave.turner=verizonwireless.com@lists.samba.org]On Behalf Of Claas Hilbrecht Sent: Tuesday, May 11, 2004 7:49 AM To: rsync@lists.samba.org Subject: rsync output -vv differs with dry-run option I'm trying to figure out if a file has changed since the last rsync call. I use the following command line: rsync -cvv /mnt/xxx/vol1/dbase/100/kunden.dbf /mnt/label | grep "^total: " | sed -e 's/.* data=//' This gives a 0 if the file is unchanged and the file size if the file has changed. Adding the "dry-run" option "n" to the command line always gives a 0. I wonder if this is a expected behaviour? -- Claas Hilbrecht http://www.jucs-kramkiste.de -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html