Last Updated: June 19, 2019
·
691
· maxehmookau

Send Output to Clipboard (OS X)

Sometimes you need to share your public key or other information quickly from the command line. Instead of

$ cat ~/.ssh/id_rsa.pub

Copy... paste....

Just do:

$ pbcopy < ~/.ssh/id_rsa.pub

And it's on your clipboard ready for pasting!

1 Response
Add your response

Similarly, pbpaste will past whatever is in your clipboard to the terminal, generally works better for text!

over 1 year ago ·