Mac OS X Copy file contents to the clipboard in Mac OS X Terminal Here is how to copy the contents of a file to your clipboard while you are in Terminal on Mac OS X. pbcopy < file.txt To confirm that the contents were …