Packages and Binaries:

xclip

xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections (“the clipboard”) from the command line. It can read data from standard in or a file and place it in an X selection for pasting into other X applications. xclip can also print an X selection to standard out, which can then be redirected to a file or another program.

Installed size: 62 KB
How to install: sudo apt install xclip

Dependencies:
  • libc6
  • libx11-6
  • libxmu6
xclip

Command line interface to X selections (clipboard)

root@kali:~# xclip -h
Usage: xclip [OPTION] [FILE]...
Access an X server selection for reading or writing.

  -i, -in          read text into X selection from standard input or files
                   (default)
  -o, -out         prints the selection to standard out (generally for
                   piping to a file or program)
  -l, -loops       number of selection requests to wait for before exiting
  -d, -display     X display to connect to (eg localhost:0")
  -h, -help        usage information
      -selection   selection to access ("primary", "secondary", "clipboard" or "buffer-cut")
      -noutf8      don't treat text as utf-8, use old unicode
      -target      use the given target atom
      -rmlastnl    remove the last newline character if present
      -version     version information
      -silent      errors only, run in background (default)
      -quiet       run in foreground, show what's happening
      -verbose     running commentary

Report bugs to <[email protected]>

xclip-copyfile

Copy and move files via the X clipboard

root@kali:~# xclip-copyfile --help
tar: Usage\: dirname [OPTION] NAME...\nOutput each NAME with its last non-slash component and trailing slashes\nremoved; if NAME contains no /'s, output '.' (meaning the current directory).\n\n  -z, --zero     end each output line with NUL, not newline\n      --help        display this help and exit\n      --version     output version information and exit\n\nExamples\:\n  dirname /usr/bin/          -> "/usr"\n  dirname dir1/str dir2/str  -> "dir1" followed by "dir2"\n  dirname stdio.h            -> "."\n\nGNU coreutils online help\: <https\://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https\://translationproject.org/team/>\nFull documentation <https\://www.gnu.org/software/coreutils/dirname>\nor available locally via\: info '(coreutils) dirname invocation': Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

xclip-cutfile

Copy and move files via the X clipboard

root@kali:~# xclip-cutfile --help
tar: Usage\: dirname [OPTION] NAME...\nOutput each NAME with its last non-slash component and trailing slashes\nremoved; if NAME contains no /'s, output '.' (meaning the current directory).\n\n  -z, --zero     end each output line with NUL, not newline\n      --help        display this help and exit\n      --version     output version information and exit\n\nExamples\:\n  dirname /usr/bin/          -> "/usr"\n  dirname dir1/str dir2/str  -> "dir1" followed by "dir2"\n  dirname stdio.h            -> "."\n\nGNU coreutils online help\: <https\://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https\://translationproject.org/team/>\nFull documentation <https\://www.gnu.org/software/coreutils/dirname>\nor available locally via\: info '(coreutils) dirname invocation': Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

xclip-pastefile

Copy and move files via the X clipboard

root@kali:~# xclip-pastefile -h
Usage: /usr/bin/xclip-pastefile

Updated on: 2025-May-20