On Thu, 4 Sep 2003, Fargusson.Alan wrote: > I don't have access to a Linux system to try this, but what happens if you do: > > dd if=/dev/dasda1 bs=4096 | scp /dev/fd/0 [EMAIL PROTECTED]://dev/tape1 > > -----Original Message----- > From: McKown, John [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 04, 2003 10:19 AM > To: [EMAIL PROTECTED] > Subject: Is there a way to get "scp" to read STDIN? > > > I want to do something like: > > program | scp - [EMAIL PROTECTED]:/output.file
And what is wrong with program | ssh [EMAIL PROTECTED] cat \>/output.file - > > Where scp is used to send the STDOUT of "program" to ~user/output.file on > "host". Apparently scp does not accept input from STDIN. If your really, > really curious about exactly what I want to do: > > dd if=/dev/dasda1 bs=4096 | scp - [EMAIL PROTECTED]://dev/tape1 > > to do a "backup" type function. In even greater detail, I want to copy the dd if=/dev/dasda1 bs=4096 ssh [EMAIL PROTECTED] dd of=/output.file bs=4096 > Debian/390 partition on /dev/dasda1 to my Linux/Intel machine. Debian/390 is > running under Hercules/390 on that Linux/Intel box. From what I can tell, > this will create a file on the Linux/Intel machine which I can then > transport, via a USB external hard drive, to my PC at work. Once there, I > will use "ftp" to transfer the data to my OS/390 system (to a tape device). > I will then create a new volume on OS/390 which "looks like" a Linux CDL > volume. I will use IEBGENER to copy the contents of the tape to the DSN > LINUX.VVOLSER.PART0001.NATIVE (RECFM=FBS,LRECL=4096,BLKSIZE=4096). From > everything that I can tell, this *should* result in a partition which is > readable on my SuSE Linux system on the z800. I would use RECFM=U,BLKSIZE=8192 or something. I would not be surprised if dd doesn't do exactly what you expect. I do think RECFM=FBS is wrong, at lease in the general case, as you are relying on 4K blocks and the might not be that size. > > Goal: To create a Debian/390 system under Linux/Intel at home, then > "transport" that Linux system to the z800 and run it under z/VM. Why not do > it all at work, you ask? I don't have the time to dedicate to it. But I can > do this easily at home. Also, when I'm at home, I don't have any "are you > finished, yet?" type questions. They don't even know that I'm working on > this. Yes, Linux on the z800 is authorized. But no funds or time is > budgetted. So I won't get in any particular trouble. The "joys" of being the > senior MVS-z/VM-zLinux sysprog are almost unbearable <sardonic grin>. I have a prebuilt Debian system you can download from me. It's a single 3390-1 volume. I don't know which is the correct format though;-( EMail off-list to summer@ if you want more info. l> > -- > John McKown > Senior Systems Programmer > UICI Insurance Center > Applications & Solutions Team > +1.817.255.3225 > > This message (including any attachments) contains confidential information > intended for a specific individual and purpose, and its' content is > protected by law. If you are not the intended recipient, you should delete > this message and are hereby notified that any disclosure, copying, or > distribution of this transmission, or taking any action based on it, is > strictly prohibited. > -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb Copyright John Summerfield. Reproduction prohibited.
