mac copy file from desktop commandline code example Example: mac copy file to clipboard terminal $ pbcopy < file.txt