March 18, 2009

Looking for an easy way to pastebin? Just pastbinit !

Filed under: Linux Admin — Bigbrovar @ 8:00 pm

In case you dont know what a pastebin is, here is a brief description.

Pastebin is a web application which allows its users to upload snippets of text, usually samples of source code, for public viewing. It is very popular in IRC channels where pasting large amounts of text is considered bad etiquette. A vast number of pastebins exist on the Internet, suiting a number of different needs and provided features tailored towards the crowd they focus on most.


I use Pastebin a lot especially when am in a support irc or IM Chat and i need to paste the debug output / log file of an application that crashed on me or when i need to share a config file.

Recently i found  an easy way to pastebin my text files by using pastebinit a small python script that reads text and sends it to a “pastebin” on the internet, returning the URL to the user. Pastebinit can be installed from the ubuntu repository

sudo apt-get install pastebinit

for those using the Nokia Internet Tablet you can install Pastebinit from here



Its a terminal based utility but is very easy to use.   cd to the directory of the text file you want to upload, and

pastebinit name-of-file


the man page for pastebinit is quite self explanatory and easy to follow.
Here are some extract from its man page on optional arguments that can be used with pastebinit

Optional arguments
-b [pastebin url] (default:

-a [author] (default: $USER)

-f [format of paste] (used for syntax-highlighting, default: text)

-t [title of paste] (ONLY FOR

-m [permatag] (ONLY FOR, default: blank)

-u [username] (ONLY FOR

-p [password] (ONLY FOR

Pastinit also support the following pastebins








The cool thing about pastebinit is that it is very flexible and it can allow the text to be passed through a pipe example

echo "LInux rocks" | pastebinit -a "bigbrovar" -b
would send the words Linux rock to under the username bigbrovar (please don’t send Linux rock to pastebin its meant for serious stuff 🙂 )

You can also use it with the grep.  Example

grep -r intrepid /etc/apt/sources.list | pastebinit -a "bigbrovar" -b b

and it would pipe the out of grep to

Hope someone finds this useful



  1. that’s cool, thanks 🙂
    we use this service for work, it’ll be useful.

    Comment by nobu^ — March 21, 2009 @ 12:47 pm | Reply

  2. @nobu^ am glad you like it. 🙂

    Comment by Bigbrovar — March 21, 2009 @ 1:03 pm | Reply

  3. well, i wud try it out if it will work

    Comment by abiola adewale — March 23, 2009 @ 7:05 pm | Reply

  4. give it a try abiola and please let me know how it works for you.

    Comment by Bigbrovar — March 24, 2009 @ 6:45 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: