Posted: . At: 6:52 AM. This was 10 years ago. Post ID: 6381
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 a file to the Internet to share it with others easily without using Pastebin.

This Linux command will copy the text file given, “myfile.txt” and send it to the sprunge.us website. This allows you to share a text file with others without too much fuss.

curl -F 'sprunge=<myfile.txt' http://sprunge.us

You may also install the PastebinCL utility on Fedora 19, this allows you to upload text to Pastebin from the command line. To compile this on Fedora 19 you need the curl development headers installed.

yum install curlpp-devel.x86_64

Then you can unpack the source tarball and type “make” to compile it. Then run the pastebincl binary and then paste text in the blank space and press Ctrl-D to submit it to pastebin. You will need a developer API key to compile the pastebincl code. You may create an account on the website and then get your key from http://www.pastebin.com/api.

06:38:38 ~/Documents/pastebincl-1.0 homer@neo $ ./pastebincl 
#!/bin/bash
 
# Ensure the Desktop folder exist
 
if [ -e mydir ]; then
	echo "The folder exists."
else
	mkdir mydir
fi
Warning: couldn't open file /home/homer/.pastebinclrc. Run 'pastebincl --usergen' to be able to post as a registered user.
Submitting paste...
Paste submitted successfully!
URL: http://pastebin.com/zNi8DpML

These are two good ways to paste text from your Linux machine to the Internet quickly. Try these out and see how you go with them.

Leave a Comment

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