Our friend on Manjaro Linux Forum @cscs has a collection of pastebin services
Sometimes we might want to easily share terminal output.
While this can be accomplished directly in the forums or manually through websites like pastebin, there also exist a number of open services that allow you to paste and share directly from the command line by using tools you already have installed.
This is great for many situations, including troubleshooting from a non-graphical boot, or simply very large outputs. Here I will share a few examples and how to use them.
Services and Examples:
<command> | curl -F 'file=@-' https://0x0.st
<command> | curl -F 'file=@-' https://rustypaste.shuttleapp.rs
<command> | curl -s --data-binary @- 'https://paste.c-net.org/'
<command> | curl -F 'clbin=<-' https://clbin.com'
ix.io (is taking a break for the time being)
<command> | curl -F 'f:1=<-' ix.io'
<command> | curl -F 'sprunge=<-' http://sprunge.us'
Aliases and other tricks:
To quasi-install rustypaste pasting and sharing add the following to your bashrc (zshrc untested):
paster()
{
local url='https://rustypaste.shuttleapp.rs'
if (( $# )); then
local file
for file; do
curl -F "file=@""$file""" "$url"
done
else
curl -F 'file=@-' "$url"
fi
}
Then you can use paster
:
To share outpot
<command> | paster
To shar file(s)
paster <filepath> <filepath2>
To quasi-install paste.c-net.org pasting and sharing add the following to your bashrc (zshrc untested):
pastenet()
{
local url='https://paste.c-net.org/'
if (( $# )); then
local file
for file; do
curl -s \
--data-binary @"$file" \
--header "X-FileName: ${file##*/}" \
"$url"
done
else
curl -s --data-binary @- "$url"
fi
}
pasteget()
{
local url='https://paste.c-net.org/'
if (( $# )); then
local arg
for arg; do
curl -s "${url}${arg##*/}"
done
else
local arg
while read -r arg; do
curl -s "${url}${arg##*/}"
done
fi
}
Then you can use 'pastenet' and 'pasteget' a few ways: To share output
<command> | pastenet
To share file(s) with a 50M limit
pastenet <filepath> <filepath2>
To download paste.c-net shared content
pasteget https://paste.c-net.org/<exampleurl>
Notes and Warnings