Posted On October 8, 2021

Linux: Copy File Contents Into Clipboard

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Linux: Copy File Contents Into Clipboard

Install XCLIP (if not already installed)

sudo apt install xclip -y

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  xclip
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.4 kB of archives.
After this operation, 60.4 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ focal/universe amd64 xclip amd64 0.13-1 [18.4 kB]
Fetched 18.4 kB in 0s (44.5 kB/s)
Selecting previously unselected package xclip.
(Reading database ... 386347 files and directories currently installed.)
Preparing to unpack .../xclip_0.13-1_amd64.deb ...
Unpacking xclip (0.13-1) ...
Setting up xclip (0.13-1) ...
Processing triggers for man-db (2.9.1-1) ...

Yank Contents of a File

xclip -sel c < simple-lightbox.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

CentOS & Redhat Linux VS Exfat

Have you ever encountered this error: "Unable to access $$$ GB Volume" Error mounting /dev/mmcblk0…

Intermittent Ping Request Time Out Due to An Outdated ARP Table Entry of a Ubuntu Server

Scenario: - Server A and Server B hardware are of the same model and capacity-…

Docker ShellInABox

docker run --privileged -p 9999:4200 -e SIAB_PASSWORD=password-e SIAB_SUDO=true sspreitzer/shellinabox:latestdocker run --privileged -d --name shellinabox -p…
Other project: DragonCoin.com