Well I didn’t know that!

I was just wondering if I could ‘cat’ something to clipboard from the terminal on the Mac, and you can!

i.e.

Open a terminal and do:

$ cat ~/Desktop/ded.html | pbcopy

Now that file is in the clipboard.

To put it somewhere else, that is, to paste it, do:

$ pbpaste > ~/Documents/ded.html

Now you should have a copy of ded.html sitting in ~/Documents.

credit to: https://apple.stackexchange.com/questions/15318/using-terminal-to-copy-a-file-to-clipboard

Leave a comment

Your email address will not be published. Required fields are marked *

Are you human? * Time limit is exhausted. Please reload the CAPTCHA.