---
name: "pbputs"
section: "1"
platform: "linux"
package: "pastebinit"
version: "1.7.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pbputs"
---

# pbputs(1)

compress and encode arbitrary files to pastebin.com pbputs - compress, encrypt, encode arbitrary files to pastebin.com pbget - decode and decompress arbitrary files from pastebin.com

## NAME

pbput - compress and encode arbitrary files to pastebin.com

pbputs - compress, encrypt, encode arbitrary files to pastebin.com

pbget - decode and decompress arbitrary files from pastebin.com

## SYNOPSIS

**pbput** \[FILENAME\]

cat foo \| **pbput**

**pbputs** \[FILENAME\] \[GPG\_USER\]

cat foo \| **pbputs \[GPG\_USER\]**

**pbget** URL \[DIRECTORY\]

## DESCRIPTION

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

**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)](/gpg/1.md) 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)](/tar/1.md) 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)](/tar/1.md) 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)](/mktemp/1.md).

In any case the uploaded/downloaded data is optionally [**tar**(1)](/tar/1.md) archived, always [**lzma**(1)](/lzma/1.md) compressed, optionally [**gpg**(1)](/gpg/1.md) encrypted, and always [**base64**(1)](/base64/1.md) encoded.  *http://pastebin.com* is used by default.

## EXAMPLES

  $ pbput /sbin/init\
   http://pastebin.com/BstNzasK\
   $ pbget http://pastebin.com/BstNzasK\
   sbin/init\
   INFO: Output is in \[/tmp/pbget.bG67DwY6Zl\]

  $ cat /etc/lsb-release \| pbput\
   http://pastebin.com/p43gJv6Z\
   $ pbget http://pastebin.com/p43gJv6Z\
   DISTRIB\_ID=Ubuntu\
   DISTRIB\_RELEASE=11.04\
   DISTRIB\_CODENAME=natty\
   DISTRIB\_DESCRIPTION="Ubuntu 11.04"

  $ pbputs /etc/shadow\
   Enter passphrase:\
   http://pastebin.com/t2ZaCYr3\
   $ pbget http://pastebin.com/t2ZaCYr3\
   Enter passphrase:\
   root:09cc6d2d9d63371a425076e217f77698:15096:0:99999:7:::\
   daemon:\*:15089:0:99999:7:::\
   bin:\*:15089:0:99999:7:::\
   sys:\*:15089:0:99999:7:::\
   ....

## SEE ALSO

[**pastebinit**(1)](/pastebinit/1.md)**, [lzma(1)](/lzma/1.md), [base64(1)](/base64/1.md), [tar(1)](/tar/1.md), [gpg(1)](/gpg/1.md), [mktemp(1)](/mktemp/1.md)**

## AUTHOR

**This manpage and the utility was written by Dustin Kirkland \<kirkland@ubuntu.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** *http://www.gnu.org/licenses/gpl.txt***.**
