ftp/rcp can't copy devices

Alexander Dupuy dupuy at douglass.columbia.edu
Tue Aug 30 14:03:28 AEST 1988


Actually, it is possible to copy from a device, using a somewhat obscurely
documented feature of ftp.  You can specify a shell command as the source or
destination of a tranfer - the command runs on the local machine in either
case.  An example which I used just a few weeks ago:

% ftp another_machine
				# password/login deleted
ftp> send "|dd if=/dev/rst8" somefile.tar
				# silly messages from dd and ftp deleted
ftp> bye
%

You don't need the quotes if the command is one word.  This can be quite useful
for spooling dumps to a remote machine which doesn't support /etc/rmt - a big
IBM mainframe with _lots_ of disk space is ideal.  By creating a ~/.netrc file,
you can even have ftp batch jobs to spool your dumps.

As Chris Torek noted, the rcp protocol requires that the size of the file be
known, which is not possible in general for devices.  There is no equivalent
feature (that I know of) in rcp to allow sending from programs.

@alex

-- 
inet: dupuy at columbia.edu
uucp: ...!rutgers!columbia!dupuy



More information about the Comp.unix.questions mailing list