Hi,
We're using:
Linux version 2.6.32-696.20.1.el6.x86_64 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Fri Jan 12 15:07:59 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
I want to send data from one server to another using scp ( secure copy procedure).
We're unzipping the data first. Also we're only unzipping the data and piping it (hence the unzip -p) to the server as opposed to unzipping to a file on the local server and then sending it. This is because the server is a producion server and they don't want us storing any additional files on the production server that might accumulate.
The initial concept command looks like this;
unzip -p car.zip car1 | scp eagle@svamn14glbsalh:/pacelog/AUTOSYS/upload_event_logs/data/car1
What I'm trying to tell Linux to do is:
1. Unzip ONLY the data from the file car1 from the zipfile car.zip.
2. pipe that infomation to the scp command.
3. Using scp, copy the data to the following directory on the following server:
eagle@svamn14glbsalh:/pacelog/AUTOSYS/upload_event_logs/data/
I'm getting the usage error:
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
So I tried doing it differently using the following command:
unzip -p car.zip car1 > scp eagle@svamn14glbsalh:/pacelog/AUTOSYS/upload_event_logs/data/car1
I was thinking take the data stream from the unzip commmand and send the output to the scp command... It didn't work. I got the following error:
caution: filename not matched: eagle@svamn14glbsalh:/pacelog/AUTOSYS/upload_event_logs/data/car1
Does anybody have any ideas? What am I missing?
Tater.