TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Remote pbcopy

35 点作者 tswicegood超过 14 年前

5 条评论

ary超过 14 年前
As someone else pointed out in a sub-comment, ssh user@host 'command' | pbcopy; seems a lot simpler. No open ports, no firewall config... no setup at all. It doesn't give you the access to the pasteboard in your current session, but Command+C has you covered.<p>Seems like overkill.
tlrobinson超过 14 年前
I did something similar for the "open" command, "ropen": <a href="https://github.com/tlrobinson/ropen" rel="nofollow">https://github.com/tlrobinson/ropen</a> You can open both files and directories. It uses sshfs with simple PHP script to coordinate. I used it for a couple weeks then forgot about it.<p>Then I did this one using Dropbox, but it only works if you have Dropbox installed on both machines:<p><pre><code> alias dbcopy="cat &#62; ~/Dropbox/.dbpasteboard" alias dbpaste="cat ~/Dropbox/.dbpasteboard" </code></pre> I think there's probably a better solution than all of these.
parenthesis超过 14 年前
While on this general subject, here's what I use to do the equivalent X copy and paste thing on Linux:<p><pre><code> # 'pbcopy' xsel -b -i # 'pbpaste' xsel -b -o</code></pre>
bockris超过 14 年前
For windows users this project <a href="http://unxutils.sourceforge.net/" rel="nofollow">http://unxutils.sourceforge.net/</a><p>has 'pclip' and 'gclip' which do the same thing as 'pbcopy' and 'pbpaste'.<p>I have been using this technique for years (without the remote stuff described in the article).
评论 #1955398 未加载
pielud超过 14 年前
Can't this be achieved just using ssh instead of setting up a process that listens to the network?<p>from remote machine:<p><pre><code> ssh me@macbook pbcopy &#60; foo.txt</code></pre>
评论 #1955200 未加载