xclip

xclip is a command line program which interacts with X11 clipboard.

To install it :

root@localhost:~# apt-get install xclip

To use, have a look at the example below :

fool@localhost:~$ ls |xclip

I have just listed the content of my current working directory and then put it to X11 clipboard through the “|” command.

To insert this content to a program like a GUI text editor, I have to paste by clicking on the middle button of my mouse.

xclip can receive the content of a whole file  :

fool@localhost:~$ xclip /etc/fstab

To display the content of xclip :

fool@localhost:~$ xclip -o

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s