I have a file in which i wanted to zip up and at the same time transfer over to another host using scp.
I tried to do the following command but failed. I do not mind zipping up and scp over later, but i just want to know where did I got it wrong
Am i wrong to use a pipe | over here ?
-bash-3.2$ gzip -c aum.dmp | scp [email protected]:/export/home/oracle/aum.dmp.gz
Usage: scp [-pqrvBC46] [-F config] [-S program] [-P port]
[-c cipher] [-i identity] [-o option]
[[user@]host1:]file1 [...] [[user@]host2:]file2
Regards, Noob
gzip -c file.dmp && scp file.dmp.gy user@host:/path/to/file
. Note that your command is missing the source file for the whole copying action.