Copying File From Unix To Windows Clipboard [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-06 13:40:25

问题


I want to copy a large file from a Unix server to the Windows clipboard using SSH.
How can this be done?

I can't install any third party application on the server
I tried various options like %y+ But none of them working for me.

UPDATE :

Finally i used scp on windows cygwin and it worked like charm Thanks


回答1:


If you have PuTTY (or any Windows SSH client) just super copy it:

scp username@linuxMachineAddress<linux directory path> C:\Documents\filename.extension

For example:

pscp firdooze@192.160.1.233:/home/firdooze/helloWorld.txt C:\Documents\helloWorld.txt

More read here




回答2:


Like the interactive session with your Unix server, you can also use ssh to execute a command and then quit. With cat, you can print the contents of files on the Unix server. Windows comes with the clip tool that captures output and places it in the clipboard. Voila:

ssh user@server cat /etc/passwd | clip



回答3:


If you would do it with vim, vim could open remote file via scp directly.

try (on windows the command line could be different, but you got the idea)

vim scp://remoteuser@server.tld//path/to/your/large/file

you have to have vim on your local machine (on your windows)

then you could play with registers.




回答4:


If you can't install third party software, you have to do a less <fileName> and copy it out one page at a time. If you can install a different putty client (should be possible, it's a standalone executable, so you should be able to save it to your desktop) There is a modified version of PuTTY that accomplishes this.



来源:https://stackoverflow.com/questions/16856477/copying-file-from-unix-to-windows-clipboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!