[Linux/OSX] Command line – How to copy a files contents to the clipboard
by Riley MacDonald, August 9, 2017

How to copy a files contents to the clipboard using the command line:

Linux:

xclip -sel clip < filename.txt

OSX:

cat filename.txt | pbcopy

This can be handy when working with .ssh files and the like.

Open the comment form

Leave a comment:

Comments will be reviewed before they are posted.

User Comments:

Be the first to leave a comment on this post!