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
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
-b [pastebin url] (default: http://pastebin.com)
-a [author] (default: $USER)
-f [format of paste] (used for syntax-highlighting, default: text)
-t [title of paste] (ONLY FOR 1t2.us)
-m [permatag] (ONLY FOR 1t2.us, default: blank)
-u [username] (ONLY FOR 1t2.us)
-p [password] (ONLY FOR 1t2.us)
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 http://paste.ubuntu.com
would send the words Linux rock to www.paste.ubuntu.com 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 http://paste.ubuntu.com b
and it would pipe the out of grep to paste.ubuntu.com
Hope someone finds this useful
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.