copy a file to clipboard using terminal mac code example Example: mac copy file to clipboard terminal $ pbcopy < file.txt