cygwin 中是否有命令行工具可以将文件复制到剪贴板?

K R*_*son 5 windows clipboard cygwin command-line

我想做这样的事情:

  • 在命令行上,将文件复制到 Windows 剪贴板
  • 在 Windows 资源管理器中,将文件粘贴到当前位置

在 cygwin 或其他地方,是否有一个简单的工具可以做到这一点?

Nic*_*ton 6

尝试clip使用 Windows 附带的实用程序。

CLIP

Description:
    Redirects output of command line tools to the Windows clipboard.
    This text output can then be pasted into other programs.

Parameter List:
    /?                  Displays this help message.

Examples:
    DIR | CLIP          Places a copy of the current directory
                        listing into the Windows clipboard.

    CLIP < README.TXT   Places a copy of the text from readme.txt
                        on to the Windows clipboard.
Run Code Online (Sandbox Code Playgroud)