On Linux (where pbcopy and pbpaste apparently don't exist), I've been using a bash function `cb` (to copy clipboard) and `cbf` (to copy a file to a clipboard) for years. If you install xclip on your system and add this to your .bashrc you can get it too: https://gist.github.com/FreedomBen/8d4d0a89fd39c8b5a5c4d5dcf...
Luckily I added a link to where I got it, because I had long forgotten. Thanks Nathan! Nathan's blog post is excellent and should be read: https://madebynathan.com/2011/10/04/a-nicer-way-to-use-xclip...