xsel
xsel is a command line tool for manipulating the X Selection. It allows you to access and modify the contents of the X clipboard from the command line. The X Selection is a common area of temporary storage used by X applications to exchange data. With xsel, you can interact with this clipboard, including copying, pasting, and clearing its contents. It supports both primary and secondary selections and can work with various data formats such as plain text, HTML, and images. Additionally, xsel offers different command line options for controlling its behavior, like specifying the selection target, encoding, and input/output files. It is especially useful in scripting and automation tasks, allowing you to manipulate clipboard data easily without a graphical user interface. Overall, xsel is a lightweight and convenient tool for managing clipboard contents in the X Window System.
List of commands for xsel:
-
xsel:tldr:8bd86 xsel: Output the clipboard's contents into the terminal (equivalent to `Ctrl + V`).$ xsel -obtry on your machineexplain this command
-
xsel:tldr:b10da xsel: Output the X11 primary selection's contents into the terminal (equivalent to a mouse middle-click).$ xsel -optry on your machineexplain this command
-
xsel:tldr:d4e95 xsel: Output the clipboard's contents into a file.$ xsel -ob > ${filename}try on your machineexplain this command