Skip to content

July 23, 2016

Paste From Command Line to Pastebin Services Using pastebinit app

by noise

Let’s say you don’t want to copy/paste a text to post it to pastebin services and then send the link to a friend but you want to automatically place it on pastebin services. In order to do that we will use pastebinit app from Mac Ports on OSX (see at the end for Linux usage). Let’s install it:

sudo port install pastebinit

After pastebinit is installed we need to find out what pastebin services (websites) are supported by this tool:

 pastebinit -l
Supported pastebins:
- cxg.de
- fpaste.org
- lpaste.net
- p.defau.lt
- paste.debian.net
- paste.drizzle.org
- paste.kde.org
- paste.openstack.org
- paste.pound-python.org
- paste.ubuntu.com
- paste.ubuntu.org.cn
- paste2.org
- pastebin.com
- pastebin.mate-desktop.org
- pb.daviey.com
- slexy.org
- sprunge.us

To use pastebinit run:

pastebinit -i our_text_file_to_paste.txt -b http://cxg.de

If you do not have our_text_file_to_paste.txt but you want to paste output of a command you can first save that output to a file using redirection:

your_command > our_text_file_to_paste.txt

Pasting text using this tool can work on other operating systems than OSX. You just need to install pastebinit package for your Linux distribution or maybe FreeBSD.

For example to install pastebinit on FreeBSD you will need to run:

pkg install pastebinit
Read more from Noise

Leave a Reply

required
required

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments