I have not yet found an easy solution to copy your file to a clipboard in Linux, similarly as in Mac by
cat file | pbcopy
I tried to use the following command in Vim unsuccessfully
:copy 1,9999999
to copy the file.
How can you copy a file fast to your clipboard in Linux such that you can then paste it to dpaste?
Try xsel. It does wonders, but it doesn't really work with the clipboard, but rather with the X selection buffer.
cat file | xsel
and then you can click the mouse wheel to paste the contents.
The Linux equivalent of
pbcopy
isxclip
.does xclip suits you?
In addition to xsel and xclip already mentioned there is also uclip. From the manual page description:
uclip is a command-line interface to the X clipboard. It either copies text, from FILE or from stdin, to the X clipboard, or prints the X clipboard to std- out. uclip supports Unicode and is locale-aware (in contrast to other similar utilities). uclip was written using Qt.
Update: Apparently uclip was not such a good recommendation because it currently does not work for copying, see here for the problem description (and hopefully a solution some day?).