Posted: . At: 9:05 AM. This was 5 years ago. Post ID: 13553
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.


How to copy text to a pastebin easily, and some other very useful tips.


This command will copy text to a pastebin online using curl.

4.4 Mon Sep 16 jason@Yog-Sothoth 0: $ echo "This is a message I want to save online." | curl -F file=@- https://0x0.st/

This would be an easy way to copy a system logfile to an online pastebin and then share it on a forum for example.

This is another way to accomplish this. Just run the command, enter your text and then press Control-D to save it to the online pastebin.

4.4 Mon Sep 16 jason@Yog-Sothoth 0: $ curl -F 'f:1=<-' ix.io
Hello world.
http://ix.io/fqw

It could also be used like this to save text output from a program to an online source.

4.4 Mon Sep 16 jason@Yog-Sothoth 0: $ ps axu | curl -F 'f:1=<-' ix.io
http://ix.io/1Vl1

This is how to save the resulting URL in a file on your hard drive, for perusal later.

4.4 Mon Sep 16 jason@Yog-Sothoth 0: $ ps axu | curl -F 'f:1=<-' ix.io 1> mynewfile
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 31874  100    18  100 31856      7  12651  0:00:02  0:00:02 --:--:-- 12658

Doing it this way, there is no output to the terminal, good for a script, and the URL is still saved in the file. These tips would be very useful for saving text to an online pastebin, there are more options then just pastebin.com.


Leave a Comment

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