How to use terminal to copy a file to the clipboard?
If I'm understanding the question right, what you're after is pbcopy and pbpaste.
Open a terminal and run:
cat ~/Desktop/ded.html | pbcopy

The file is now in your clipboard.
To put it somewhere else (i.e. paste it) run:
pbpaste &gt; ~/Documents/ded.html

Now you should have a copy of ded.html sitting in ~/Documents.