In message <007401bfd7b5$fe30d9d0$6302a8c0@marte>, "Jakub Troszok" writes:

> Hello!
> I am trying to make a graphical interface for rsync and I would like to
> know if there is a possibility to know the file size before starting to sync
> the files ?
> I was looking through the options and I did not find.

There isn't really an option to do it, but if you use rsync to do a
pull from an rsync daemon, then you can get the information you want
by using the syntax:

   rsync [options] rsync://remotehost/module

i.e., use the same command that you would use to sync a tree but do
not specify a target.  Here's an example:

alberto@guinan-923: rsync rsync://rsync.samba.org/rsyncftp/'*'
Welcome to the Samba anonymous rsync archives

Contact [EMAIL PROTECTED] if you have problems. 

Please use mirror.samba.org for the sambaftp and sambawww directories.

The linux-pmac-stable and linux-pmac-devel archives have moved to
linuxcare.com.au.

------

skipping directory /binaries
skipping directory /old-versions
skipping directory /patches
-rw-r--r--       17982 1997/12/26 23:26:26 COPYING
-rw-r--r--        7002 1999/03/15 16:23:10 README
-rw-r--r--      228443 2000/04/08 22:58:32 cvs.log
-rw-r--r--      325692 2000/04/08 22:54:13 rsync-2.4.3.tar.gz
-rw-r--r--       37906 2000/04/08 22:54:08 rsync.html
-rw-r--r--       20727 2000/04/08 22:54:11 rsyncd.conf.html
-rw-r--r--      349819 1996/06/19 00:11:51 tech_report.ps
-rw-r--r--        3848 1999/04/06 08:57:43 win95.txt


I actually have a couple of complaints about this "feature:"

1) if a directory is included in the file list, the rsync server does
   not display the information you'd expect but rather says "skipping
   directory xxx".  Try for instance rsync rsync://rsync.samba.org/ftp/'*'

2) the output contains "welcome" messages, which makes it hard to
   parse in a simple programmatic way

3) it only works in rsync daemon mode -- why shouldn't we be allowed
   to do the same thing when using a remote shell?  I realize that you
   can generate similar output by doing something like:
       ssh remotehost /bin/ls -l /foo/bar
   but the output of ls is not always guaranteed to be consistent
   across operating systems

A while ago I was thinking about either modifying the daemon output
to address (1) and (2) in daemon mode, or maybe by adding a
new option (--list), but then got sidetracked and ended up doing
things differently.

Hope this helps,


-- Alberto



****************************************************************************
Alberto Accomazzi                          mailto:[EMAIL PROTECTED]
NASA Astrophysics Data System                      http://adsabs.harvard.edu
Harvard-Smithsonian Center for Astrophysics        http://cfawww.harvard.edu
60 Garden Street, MS 83, Cambridge, MA 02138 USA   
****************************************************************************

Reply via email to