From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8bdb9393eca932cf X-Google-Attributes: gidfee84,public From: Bob Harris Subject: Re: FTP and RCP severe limitations? Date: 2000/02/26 Message-ID: <260220001213412409%harris@zk3.dec.com>#1/1 X-Deja-AN: 590309352 Content-Transfer-Encoding: 8bit References: To: "Mark M." Posted-And-Mailed: yes Content-Type: text/plain; charset=ISO-8859-1 Organization: Digital Equipment Corporation, Palo Alto, CA, USA Mime-Version: 1.0 User-Agent: YA-NewsWatcher/4.2.2 Newsgroups: comp.unix.osf.osf1 [[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article , Mark M. wrote: XI work once in a while on two DEC Alphastation 166's with OSF/1, (version is Xabout 2 yrs old). Each system is identical (like two engines on a plane, to Xkeep it flying in all conditions) because we run a mission-critical Process XControl system on it that operates heavy equipment at a shipping site. X XHere's the problem: Every hour of every day a 250k file is created Xcontaining history for the hour (24 files per day). We have about 50,000 Xfiles now and it continues to grow on each machine at 24 files per day in a Xsingle directory. When I use "ftp -i" or even "rcp" to copy files from one Xmachine to the other it only permits me to copy about 250 to 300 files at a Xtime, (I use a wildcard when transferring). If my wildcard is going to Xaccess more than this number of files I get some sort of error saying that X"it's too much to do at once". X XI must copy history periodically between machines because sometimes one Xmachine goes down, and therefore gets a "history hole" that has to be filled Xwith files from the other machine. Another reason for copying large numbers Xof files is when I want to copy a directory within a single machine, and in Xthis case, the same problem occurs. X XIs there a setting I can change on the system so that I can copy as many Xfiles as I want? This seems like a ridiculous limitation we are living with. XTo compensate for this limitation I have been saving massive directories Xwith TAR, then restoring the directories all at once to the second machine, X(but this is also slow since the machines are about a kilometre apart, Xconnected by fibre). This is a "Kludge" but can you use 'rsh' to either start a script running on the remote system or to pass commands over to the remove system to be run. If you can, then may be you could use 'find' to collect the names of the files to transfer and then have the remote system push them over to you via 'rcp' or an 'ftp' utility running in a script. Or use 'rsh' to run 'find' on the remote system and return the list of files to the local system where you can run 'rcp' using the list of files returned. this is just psuedo shell code which I have not debugged nor I have I run it. It is just to give an idea of what I mean. #!/bin/ksh rsh -l username remote_host find /directory_of_histories -print | \ while read file do rcp remote_host:$file local_destination done exit In this case the 'find' command is shipped to the remote system, but its output is passed back to the local system where it is piped into a shell script 'while' command that reads each filename into the variable 'file'. The 'while' loop then executes an 'rcp' command for each file to be copied. You could just as easily pass over all the commands to be executed on the remote, or you could copy over a script to find the files and have the remote system copy them over to your local system. You could also pass over the 'ls -1' command to get a list of files in the directory. Your 'while' loop can do some filtering based on the names if that is desired. The 'find' command can do various selection services such as only selecting files that less than a day old find /dir -mtime -3 -print I hope this helps.