pmduxw
Last Updated: August 30, 2016
·
14.29K
· jwebcat

copy files to clipboard in windows git bash

for windows 7 users you can access the clipboard from shell too :)

-

  • to copy from a file
$ cat file > /dev/clipboard
  • to paste into a file
$ cat /dev/clipboard > file
  • or to check the contents of the clipboard
$ cat /dev/clipboard

:) enjoy.

4 Responses
Add your response

7038

I get permission denied to the clipboard.

over 1 year ago ·
7041

Hmm are you using an administrator account?

You can also use

$ clip < thing to copy
# then to paste
$ clip > file
over 1 year ago ·
7042

Made sure you have then first /
Like: /dev/clipboard

It should work on windows bash.

over 1 year ago ·
16316

Thanks!

over 1 year ago ·