Linux Commands Examples

A great documentation place for Linux commands


compress, encrypt, encode arbitrary files to pbget - decode and decompress arbitrary files from

see also : pastebinit - lzma - base64 - tar - gpg - mktemp


pbput [FILENAME]

cat foo | pbput


cat foo | pbputs [GPG_USER]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!



$ pbput /sbin/init
$ pbget
INFO: Output is in [/tmp/pbget.bG67DwY6Zl]

$ cat /etc/lsb-release | pbput
$ pbget

$ pbputs /etc/shadow
Enter passphrase:
$ pbget
Enter passphrase:


pbput is a program that can upload text files, binary files or entire directory structures to a pastebin, such as

pbget is a program that be used to retrieve content uploaded to a pastebin by pbput.

pbputs operates exactly like pbput, except it encrypts the data. An optional GPG_USER argument is allowed, which will sign and encrypt the data to the target user in one’s keyring (which could be oneself!). Otherwise, the user is prompted for a symmetric passphrase for encrypting the content with gpg(1) before uploading. pbget will automatically prompt the receiving user for the pre-shared passphrase.

pbput and pbputs can take its input either on STDIN, or as a FILENAME argument.
- If STDIN is used, then the receiving user’s pbget will simply paste the input on STDOUT.
- If a FILENAME or DIRECTORY is passed as an argument, then it is first archived using tar(1) to preserve the file and directory attributes

pbget takes a URL as its first, mandatory argument. Optionally, it takes a DIRECTORY as a second parameter. If the incoming data is in fact a file or file structure in a tar(1) archive, then that data will be extracted in the specified DIRECTORY. If no DIRECTORY is specified, then a temporary directory is created using mktemp(1).

In any case the uploaded/downloaded data is optionally tar(1) archived, always lzma(1) compressed, optionally gpg(1) encrypted, and always base64(1) encoded. is used by default.

see also

pastebinit , lzma , base64 , tar , gpg , mktemp


This manpage and the utility was written by Dustin Kirkland <kirkland[:at:]ubuntu[:dot:]com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or later published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL, or on the web at

How can this site be more helpful to YOU ?

give  feedback