
On Wed, 2006-09-27 at 06:44 -0700, Jared Buck wrote:
Hey,
I know you can use rsync to make a mirror on your computer of all of the PG books. I'd like to do this but have it only download the zip files, excluding everything else. I am using windows for this purpose so I have cygwin installed with rsync available. I know there's a command line for rsync available on PG but I need to know how to change the line so i can tell rsync to get only the zip files and nothing else. Aaron told me some on here use it so i hope someone on here can help me :-d
Trial and error helps. man 1 rsync helps. This might help: rsync -avzprlHtPS --delete --exclude=[0-9]*.txt --exclude=*.iso \ --exclude=*.rar --exclude=*.ISO --exclude=*.mp3 --exclude=pgdvd* \ user@remote.pg.mirror.site::gutenberg Gutenberg -- David A. Desrosiers desrod gnu-designs com http://gnu-designs.com "Erosion of civil liberties... is a threat to national security."

hJared Buck <JBuck814366460@aol.com> writes
Hey,
I know you can use rsync to make a mirror on your computer of all of the PG books. I'd like to do this but have it only download the zip files, excluding everything else. I am using windows for this purpose so I have cygwin installed with rsync available. I know there's a command line for rsync available on PG but I need to know how to change the line so i can tell rsync to get only the zip files and nothing else. Aaron told me some on here use it so i hope someone on here can help me :-d
Rsync has an exclude and include option, see the man page available at <http://optics.ph.unimelb.edu.au/help/rsync/rsync.html>. To answer the specific question including the options --include "*.zip" --exclude "*" in that specific order in the command line should do the job. The first rule tells rsync to download all the *.Zip files the second to exclude everything not matched by a prior rule. -- Great Internet Mersenne Prime Search http://www.mersenne.org/prime.htm Livejournal http://brett-dunbar.livejournal.com/ Brett Paul Dunbar To email me, use reply-to address

Hi Windows rsync users, Just a brief note to tell you that at least for me I get permission problems with the Cygwin port of rsync. It works fine but always sets the date to the system date. I know you can use the archive option to prevent that but all that does is generate an error and still scrambles the original file dates. I looked for a more native port but found none. There is another port with just the necessary Cygwin dll files that sort of worked but still had the same permission problems. I haven't found a solution. I'm on Windows 98 so maybe XP is better about this but my reading of the various Windows ports indicates otherwise. I have to thank David here though. Once I learned about Rsync, I found it to be one of the best tools I've ever used. It's great for copying drives, synchronizing files, or anything else. Now, if I could only get Samba working so well! :-) -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.12.9/457 - Release Date: 9/26/06

On Thu, 2006-09-28 at 01:04 -0700, Tony Baechler wrote:
I have to thank David here though. Once I learned about Rsync, I found it to be one of the best tools I've ever used. It's great for copying drives, synchronizing files, or anything else. Now, if I could only get Samba working so well! :-)
Just ask. ;)

On Thu, 2006-09-28 at 01:04 -0700, Tony Baechler wrote:
Just a brief note to tell you that at least for me I get permission problems with the Cygwin port of rsync. It works fine but always sets the date to the system date. I know you can use the archive option to prevent that but all that does is generate an error and still scrambles the original file dates.
The problem is your Windows filesystem, which doesn't have the proper metadata in the filesystem inodes to store those attributes. Best to just set up a dedicated BSD or Linux backup/mirror machine and rsync from there, and then share that data across to your Windows machine(s) with Samba. That's pretty much what I do here, but I have a LOT of mirrors loaded up, so its eating an enormous amount of disk space (Wikipedia, CPAN, LDP, Gutenberg, Debian ports, BSD, about 500 Linux/BSD ISO images, system backups and so on). Fun stuff.

Tony Baechler <tb@baechler.net> writes
Hi Windows rsync users,
Just a brief note to tell you that at least for me I get permission problems with the Cygwin port of rsync. It works fine but always sets the date to the system date. I know you can use the archive option to prevent that but all that does is generate an error and still scrambles the original file dates. I looked for a more native port but found none. There is another port with just the necessary Cygwin dll files that sort of worked but still had the same permission problems. I haven't found a solution. I'm on Windows 98 so maybe XP is better about this but my reading of the various Windows ports indicates otherwise.
I use rsync under XP, using a directory containing just rsync.exe cygopt-0.dll and cygwin.dll alongside some batch files rather than a full cygwin installation. I seem to have avoided the problems you are having. I do not attempt to retain the file permissions and use the modify-windows option to take account of the windows time stamps only being accurate to two seconds. The update script I have set up as a *.Bat file is as follows: @rem Updates the root directory and writes the output to a file called gutlog.txt in the current directory, overwriting existing gutlog.txt rsync --recursive --exclude "*/" --relative --links --hard-links --times --sparse --verbose --partial --progress --modify-window=2 --delete ftp@ftp.ibiblio.org::gutenberg h:/gutenberg > gutlog.txt 2>&1 @rem Updates the directory where new stuff is currently being placed and adds the output to gutlog.txt rsync --recursive --exclude "1/9/[0-2]/*" --relative --links --hard-links --times --sparse --verbose --partial --progress --modify-window=2 --delete ftp@ftp.ibiblio.org::gutenberg/1/9/ h:/gutenberg >> gutlog.txt 2>&1 If you remove the exclude rule from the first rsync command you should get a full mirror, I have mine on drive h. e.g. rsync --recursive --relative --links --hard-links --times --sparse --verbose --partial --progress --modify-window=2 --delete ftp@ftp.ibiblio.org::gutenberg h:/gutenberg > gutlog.txt 2>&1 This will create a full mirror on drive h and the full output will be logged as gutlog.txt in the directory from which you ran the script. -- Great Internet Mersenne Prime Search http://www.mersenne.org/prime.htm Livejournal http://brett-dunbar.livejournal.com/ Brett Paul Dunbar To email me, use reply-to address
participants (4)
-
Brett Paul Dunbar
-
David A. Desrosiers
-
Jared Buck
-
Tony Baechler