Reputation: 43
I need to copy a file from windows to UNIX to a specific folder and set the file group (chgrp or something). The problem is that i have more than 16 groups in unix.
Is there a way to do it without writing and launching a UNIX script?
Upvotes: 1
Views: 43884
Reputation: 1
The above answer by @Ravi Dhoriya is good but sometimes it does not work. You might need to add the -scp flag to force the scp protocol:
pscp -scp [email protected]:/etc/hosts c:\temp\example-hosts.txt
Upvotes: 0
Reputation: 4414
It should work using PSCP. Instructions:
set PATH=<path to the pscp.exe file>
pscp.exe
using cd
commandpscp
use the following command to copy file form remote server to the local system
pscp [options] [user@]host:source target
So to copy the file /etc/hosts
from the server example.com
as user fred to the file c:\temp\example-hosts.txt
, you would type:
pscp [email protected]:/etc/hosts c:\temp\example-hosts.txt
Upvotes: 4