tags:

views:

13

answers:

1

When I copy things to the clipboard, I can dump them into my console window or redirect to a file using

pbpaste > out.txt

But if I right click and image and copy in a browser, then attempt

pbpaste > out.jpg

Nothing is outputted.

Where does OS X store the image data in the clipboard? Is there some way to access it from the commandline similarly to pbpaste?

A: 

man pbpaste says that it only looks for plain text, rich text, or encapsulated postscript. I don't know any command that handles more general pasteboard data, but it probably wouldn't be hard to write one.

JWWalker
Any idea where is the data stored? Is it shoved directly into memory, into some standard temporary file?
Jamie Wong
I don't know where the data is stored, but why do you care? You can access it with APIs (Carbon or Cocoa).
JWWalker
I care because it's extremely convenient to be able to use pbcopy and pbpaste from the command line. It allows me to avoid going through finder just to copy the contents of a file in my current working directory.
Jamie Wong