Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to copy fast a file to clipboard in a Linux computer

I have not yet found an easy solution to copy your file to a clipboard in Linux, similarly as in Mac by

cat file | pbcopy

I tried to use the following command in Vim unsuccessfully

:copy 1,9999999

to copy the file.

How can you copy a file fast to your clipboard in Linux such that you can then paste it to dpaste?

like image 483
Léo Léopold Hertz 준영 Avatar asked Apr 11 '09 13:04

Léo Léopold Hertz 준영


People also ask

How do I copy files to clipboard?

Open the file that you want to copy items from. Select the first item that you want to copy, and press CTRL+C. Continue copying items from the same or other files until you have collected all of the items that you want. The Office Clipboard can hold up to 24 items.

How do I copy a whole file in Linux?

To copy files and directories use the cp command under a Linux, UNIX-like, and BSD like operating systems. cp is the command entered in a Unix and Linux shell to copy a file from one place to another, possibly on a different filesystem.

How do I copy to clipboard in bash?

xclip -selection c will send data to the clipboard that works with Ctrl + C , Ctrl + V in most applications. If you're in Linux terminal mode (no X) then look into gpm or Screen which has a clipboard. Try the Screen command readreg . Under Windows 10+ or Cygwin, use /dev/clipboard or clip .


1 Answers

does xclip suits you?

like image 105
Konstantinos Avatar answered Sep 22 '22 17:09

Konstantinos