Skip to content
Cut, copy and paste files from the clipboard in a Linux terminal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Cut, copy and paste files from the clipboard in a Linux terminal.


Clipboard-files provides a series of command line operations to cut, copy and paste files from the desktop environment clipboard with a Linux terminal. Files and folders can be copied and moved, to and from file manager applications, as well as between terminal instances.

The usage commands: ccopy, ccut, cpaste, cshow and cclear are symbolic links to the main script named clipboard-files in order to have short and concise command names.

Read a little blog post about the script here:


  • ccut FILE [FILE]... Cut files or folders to clipboard
  • ccopy FILE [FILE]... Copy files or folders to clipboard
  • cpaste Paste from clipboard to the current dir
  • cshow Show files on clipboard
  • cclear Clear clipboard without any file operations
  • . ccd cd to the dir of the 1st file on clipboard
  • clipboard-files Show help


$ ccopy file1.txt file2.jpg
2 item(s) copied to clipboard
$ cshow
Operation: copy
$ cd folder/
$ cpaste
Copying the following items(s) to current dir:
$ ccut *
2 item(s) cut to clipboard
$ cd ..
$ cpaste
Moving the following items(s) to current dir:


The script may not work in all desktop environments. The following should be supported:

  • Gnome
  • Mate
  • Unity
  • XFCE


The following commands will install the script in /usr/bin/ and create the required command symlinks.

Go to a temporary folder and run:

git clone
sudo cp clipboard-files/clipboard-files /usr/bin/
cd /usr/bin
sudo ln -s clipboard-files ccopy
sudo ln -s clipboard-files ccut
sudo ln -s clipboard-files cpaste
sudo ln -s clipboard-files cshow
sudo ln -s clipboard-files cclear
sudo ln -s clipboard-files ccd

The script requires xclip. Install it with:

sudo apt install xclip


cd /usr/bin
sudo rm clipboard-files ccut ccopy cpaste cshow cclear ccd

To remove xclip:

sudo apt purge xclip

Thanks to

You can’t perform that action at this time.