Copy file contents to the clipboard in Linux terminal [closed]

xclip -sel c < input_file

will copy the contents of input_file to clipboard. xclip requires installation. To install

sudo apt install xclip

-sel stands for -selection. c is for clipboard. Interchangeable.

Capable of much more, I advise reading its man page.

There is also xsel. This answer on Unix SE gives a very thorough answer to this exact question.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)