Posted: . At: 9:45 AM. This was 5 years ago. Post ID: 13659
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to copy text directly to a pastebin from the clipboard in Linux.


It is very easy to copy text to a online pastebin from the clipboard with Linux. This post will show you how to do this.

The https://0x0.st/ website is a very useful online pastebin. I am going to show how to send text to a pastebin like this.

Make sure xclip and curl are installed.

sudo apt-get install xclip curl

Then run this command to send text from the clipboard to the aforementioned pastebin.

4.4 Tue Oct 15 jason@Yog-Sothoth 0: $ xclip -sel c -o | curl -F file=@- https://0x0.st/
https://0x0.st/zfin.txt

Then the text is accessible from the weblink printed by the command. This is a very useful Linux tip, and could be used in a script to send text to the Internet automatically.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.