

Conrad Parker XSel

[ Introduction | Advanced features | Usage manual | Download | Standards | License | Contact ]

Latest version: 1.2.0

Introduction

XSel is a command-line program for getting and setting the contents of the X selection. Normally this is only accessible by manually highlighting information and pasting it with the middle mouse button.

To read a file into the X selection: xsel < file after which you can paste the file's contents into any X application with the middle mouse button, as though you had highlighted its text. xsel will read in the file contents exactly, whereas manual highlighting invariably breaks lines and transforms tabs into spaces. This is especially handy for copying in large files.

To write the X selection to a file: xsel > file after which file will contain exactly the contents of the X selection, without trailing newlines and spaces and crap.

XSel is more than just cat for the X selection.