Open a terminal and run:
cat ~/Desktop/foo.html | pbcopy
1
The file is now in your clipboard.
To put it somewhere else (i.e. paste it) run:
pbpaste > ~/Documents/bar.html
1
Now you should have a copy of foo.html
sitting in ~/Documents.
Refs:
- https://apple.stackexchange.com/questions/15318/how-to-use-terminal-to-copy-a-file-to-the-clipboard
Comment