How to copy a file to “clip board” memory

You have a file sitting on your disc. You want to put a copy of the contents in your OS “clip board” so that you can paste it somewhere, e.g. on a website, without having to open the file in a text editor, selecting everything and hitting the COPY key combination, say Command-C on a Mac.

Copy a file to clip-board:

pbcopy < PATH_TO_FILE

Paste the contents you copied:

pbpaste

Leave a Reply