Software developers or users always encounter different problems during the process of software development or usage. Some of these problems may include errors, therefore one way to solve them is to share error messages, command output or the contents of given files with other developers or users on the Internet.
There are many online platforms for sharing such problems which can be referred to as online content-sharing tool. An online content-sharing tool is often called a pastebin.
The Fedora ecosystem has one such tool called fpaste, is a web-based pastebin and a command line tool used for debugging errors or simply looking for feedback on some text.
Therefore in this article we are going to look at ways of how you can use fpaste as a programmer or normal user to report errors from commandline to fpaste.org site..
In order to use fpaste, you need to access it using one of the two ways; via the website or the command line. In this guide we shall focus more on the command line but let us see how you can use it via the web-based interface.
To use it from the website, you can go to fpaste website, copy your error, paste it into the input box provided, and then submit it. A response page will be provided and it has the URL link that you can send to fellow debuggers.
The web user interface allows a user to:
- set the syntax of the paste.
- tag the paste with his or her alias.
- use a password.
- set a time for the pasted error to expire.
How to Install fpaste Tool in Linux
To install it on Fedora/CentOS/RHEL distributions, you can run the following command as a privileged user.
# yum install fpaste # dnf install fpaste [On Fedora 22+ versions]
Sample Output
Last metadata expiration check performed 0:21:15 ago on Fri Jan 22 15:25:34 2016. Dependencies resolved. ================================================================================= Package Arch Version Repository Size ================================================================================= Installing: fpaste noarch 0.3.8.1-1.fc23 fedora 38 k Transaction Summary ================================================================================= Install 1 Package Total download size: 38 k Installed size: 72 k Is this ok [y/N]: y Downloading Packages: fpaste-0.3.8.1-1.fc23.noarch.rpm 9.3 kB/s | 38 kB 00:04 --------------------------------------------------------------------------------------- Total 5.8 kB/s | 38 kB 00:06 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Installing : fpaste-0.3.8.1-1.fc23.noarch 1/1 Verifying : fpaste-0.3.8.1-1.fc23.noarch 1/1 Installed: fpaste.noarch 0.3.8.1-1.fc23 Complete!
Now we will see some ways on how to use fpaste from terminal.
You can paste a test.txt, as follows:
# fpaste test.txt Uploading (1.9KiB)... http://ur1.ca/ofuic -> http://paste.fedoraproject.org/313642/34569731
To use a nickname and password while pasting test.txt, run this command.
# fpaste test.txt -n “labmaster” --password “labmaster123” test.txt Uploading (4.7KiB)... http://ur1.ca/ofuih -> http://paste.fedoraproject.org/313644/57093145
To send a script file named test_script.sh
, specify the language as bash, copy the returned URL link to the X clipboard and make the paste private as follows.
# fpaste -l bash --private --clipout test_script.sh Uploading (1.9KiB)... http://ur1.ca/ofuit -> http://paste.fedoraproject.org/313646
To send the output of the w
command, run this command.
# w | fpaste Uploading (0.4KiB)... http://ur1.ca/ofuiv -> http://paste.fedoraproject.org/313647/53457312
To send your system information with a description and a confirmation, run this command below.
# fpaste --sysinfo -d "my laptop" --confirm -x "1800" Gathering system info .............................OK to send? [y/N]: y Uploading (19.1KiB)... http://ur1.ca/ofuj6 -> http://paste.fedoraproject.org/313648/53457500
You can also paste the output of more than one command. In the next example I am going to send the output of the following commands; uname -a, date and who.
# (uname -a ; date ; who ) | fpaste --confirm -x "1800" Linux tecmint.com 4.2.6-301.fc23.x86_64 #1 SMP Fri Nov 20 22:22:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Fri Jan 22 15:43:24 IST 2016 root tty1 2016-01-22 15:24 root pts/0 2016-01-22 15:32 (192.168.0.6) OK to send? [y/N]: y Uploading (0.4KiB)... http://ur1.ca/ofujb -> http://paste.fedoraproject.org/313649/14534576
You can use many other options of fpaste in man pages.
# man fpaste
Summary
fpaste is a good content-sharing tool with easy to use methods. We have looked at some few examples of using it in this guide but you can explore more by trying out many other options.
If you encounter any errors while using it, you can post a comment or for those of who use fpaste, please add some information about how you use it and share your experience.