My GUI does not work. I can only see a text terminal. I would like to send my logs to paste.ubuntu.com but I don't know how. Without a graphical interface, I am lost.
Is there any way to submit a file to pastebin without needing any GUI?
My GUI does not work. I can only see a text terminal. I would like to send my logs to paste.ubuntu.com but I don't know how. Without a graphical interface, I am lost.
Is there any way to submit a file to pastebin without needing any GUI?
There are many ways, of course, but I start with one which is simple to explain: it just requires some command line magic. I assume that there is internet connection (check it for example with
ping -c 5 google.com
. Also, I assume that/my/file
is the location of file you would like to submit, and JohnDoe is your askubuntu nickname.The simplest of it all, but you need to install pastebinit first:
Submit using curl. For that, curl must be installed.
You will see some output, with one of the lines looking more or less like that:
This is the link you need to share.
There is a number of text-only web browsers, for example
w3m
. Run these commands:You move around with a cursor. When you come to the text area and press "Enter", w3m will ask you which editor to use; choose
nano
. Use CtrlR to read in the file.Your USB sticks still work. Insert an USB stick and type
mount
to see at what location it has been mounted. Say, you see that it is/media/MyStick
. You can copy the file using command lineHere's a one-liner that uses dpaste.com:
That
curl
command will return a URL that will display the contents ofMY_LOGFILE
.(Disclosure: I run dpaste.com.)
using
curl
chmod u+x pastebin.sh
./pastebin.sh < file-name
orcat file | ./pastebin.sh
and after running it, it gives you an output like this:
https://paste.ubuntu.com/p/kK3xxKHs3c/
NOTE
for expiration day can be:
source
pastebinit by default uses pastebin.com
instead you can use gist. you need to install Ruby first then install gist gem
gem install gist
https://github.com/defunkt/gist