For example, to copy a folder named Expenses in your Documents folder to another volume named Data: % cp -R ~/Documents/Expenses /Volumes/Data/Expenses The -R flag causes cp to copy the folder and its contents al app on your Mac, use the cp command to make a copy of a file.MacOS: Use Clipboard in Terminal Without a Mouse - The Mac It reads from STDIN and copies the text to the clipboard, so commands like these work: $ echo foo bar baz | pbcopy $ cat /etc/passwd | pbcopy. al to the Mac clipboard, I can confirm that the macOS pbcopy command works.al and wanted to copy contents of a file to the clipboard and move on to your next task? This seems to be a pretty common occurrence for me and I just found out there is a command to do precisely that: pbcopy.If you've ever tried to easily get the contents of a. al to pbcopy and they will directly to Mac's clipboard.Home Mac terminal copy file to clipboard Copy terminal output to clipboard Mac OS