2
I like to use /dev/clipboard for moving content easily between Windows and Cygwin's command-line tools. It seems like Cygwin has problems with large clipboard contents, though. I get an error like this when I try to access /dev/clipboard after copying a large amount of text on the Windows side:
$ wc -c /dev/clipboard
wc: /dev/clipboard: Bad address
573440 /dev/clipboard
Is there a fixed buffer size for the clipboard that I can somehow increase? Or is this some other issue entirely?
How much is a lot in your case i.e. at what amount of data does it struggle? The example you show above shows ~560kB, but I just tried with 8 megs and it seemed to work just fine. Also, just for curiosity's sake, could you try using
getclip
andputclip
instead of handling the/dev/clipboard
device and see if that makes any difference? I doubt it, they probably do the exact same thing, but I'm curious.cat large.txt | putclip ; getclip | wc -c
– Costa – 2013-02-15T14:51:43.527I played around in Notepad for a bit, and found that at 16384 characters, it works fine. At 16385 characters, it breaks with the "Bad address" error. I tried getclip and putclip, though, and those worked fine with even 100 MB of text! Put that in as the answer and I'll accept it. – John Sprad – 2013-02-15T16:57:48.920