Sunday, February 20, 2011

Pastebin, and pastebinit

Another helpful snippet tonight in #kubuntu (all the cool stuff is in there!):

Have you ever run into a problem, where you have a long error message or something that you need to show someone in IRC? The answer is to use a pastebin which is a service where you can paste that text (or image, in an imagebin) and give the link. This keeps help channels readable; long pastes are called flooding, and will usually get you automatically disconnected. The best one, in my opinion, is http://paste.kde.org.

But what happens when you are working in a console on one computer, and using another for IRC? If the text terminal is connected to the Internet, my wise friend Daskreech says:

[22:46] Daskreech: apt-get install pastebinit
[22:46] Daskreech: lsmod | pastebinit
[22:46] Daskreech: it will upload it to pastebin for you

Lsmod, (list loaded modules) by the way, is a useful Unix command to use when you need to figure out which modules might be messing with your display or sound. The | is called a pipe, and is used to tell some commands where to output; in this case the pastebin.

Thanks for another useful tip, Daskreech! You rock.

PS to beginners, or those in stress: the apt-get command always needs to be proceeded by sudo, to give you root power. So the whole command will be: sudo apt-get install pastebinit. Now the apt has been updated in Debian distros, you can instead just do sudo apt install pastebinit.