I have a large tar.gz file that I need to transfer from Windows to a UNIX machine and unzip into a folder that my login user doesn't have write permissions on. Once the file is on the machine I can extract it into the correct folder by using another user, but this user can't log in directly.

The problem is that the user that does the scp only has write permissions on its ~ and /tmp folders, neither of which is big enough to accept the file.

Therefore, I would like to use a named pipe created in the /tmp directory that I can extract the .tar.gz from using the user with the correct privs.

However, I am unsure how to cat the tar.gz to the named pipe using Putty. I have a feeling that plink is involved, but I can't quite work out the command.

plink -ssh user@host "cat > namedpipe" < file.tar.gz
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.