{"id":12769,"date":"2019-03-28T19:21:00","date_gmt":"2019-03-28T19:21:00","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12769"},"modified":"2019-03-28T19:21:00","modified_gmt":"2019-03-28T19:21:00","slug":"fpaste-a-tool-for-sharing-errors-and-commandline-output-to-pastebin","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/fpaste-a-tool-for-sharing-errors-and-commandline-output-to-pastebin\/","title":{"rendered":"fpaste \u2013 A Tool for Sharing Errors and Commandline Output to Pastebin"},"content":{"rendered":"<p>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.<\/p>\n<p>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\u00a0<strong>pastebin<\/strong>.<\/p>\n<p>The Fedora ecosystem has one such tool called\u00a0<strong>fpaste<\/strong>, is a web-based\u00a0<strong>pastebin<\/strong>\u00a0and a command line tool used for\u00a0debugging errors or simply looking for feedback on some text.<\/p>\n<p>Therefore in this article we are going to look at ways of how you can use\u00a0<strong>fpaste<\/strong>\u00a0as a programmer or normal user to report errors from commandline to\u00a0<strong>fpaste.org<\/strong>\u00a0site..<\/p>\n<p>In order to use\u00a0<strong>fpaste<\/strong>, 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.<\/p>\n<p>To use it from the website, you can go to\u00a0<a href=\"http:\/\/fpaste.org\/\" target=\"_blank\" rel=\"nofollow noopener\">fpaste<\/a>\u00a0website, 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\u00a0link that you can send to fellow debuggers.<\/p>\n<p>The web user interface allows a user to:<\/p>\n<ol>\n<li>set the syntax of the paste.<\/li>\n<li>tag the paste with his or her alias.<\/li>\n<li>use a password.<\/li>\n<li>set a time for the pasted error to expire.<\/li>\n<\/ol>\n<h3>How to Install fpaste Tool in Linux<\/h3>\n<p>To install it on\u00a0<strong>Fedora<\/strong>\/<strong>CentOS<\/strong>\/<strong>RHEL<\/strong>\u00a0distributions, you can run the following command as a privileged user.<\/p>\n<pre># yum install fpaste\r\n# dnf install fpaste         [On <strong>Fedora 22+<\/strong> versions]\r\n<\/pre>\n<h5>Sample Output<\/h5>\n<pre>Last metadata expiration check performed 0:21:15 ago on Fri Jan 22 15:25:34 2016.\r\nDependencies resolved.\r\n=================================================================================\r\n Package         Arch            Version                   Repository       Size\r\n=================================================================================\r\nInstalling:\r\n fpaste          noarch          0.3.8.1-1.fc23            fedora           38 k\r\n\r\nTransaction Summary\r\n=================================================================================\r\nInstall  1 Package\r\n\r\nTotal download size: 38 k\r\nInstalled size: 72 k\r\nIs this ok [y\/N]: y\r\nDownloading Packages:\r\nfpaste-0.3.8.1-1.fc23.noarch.rpm                       9.3 kB\/s |  38 kB     00:04    \r\n---------------------------------------------------------------------------------------\r\nTotal                                                  5.8 kB\/s |  38 kB     00:06     \r\nRunning transaction check\r\nTransaction check succeeded.\r\nRunning transaction test\r\nTransaction test succeeded.\r\nRunning transaction\r\n  Installing  : fpaste-0.3.8.1-1.fc23.noarch                                       1\/1 \r\n  Verifying   : fpaste-0.3.8.1-1.fc23.noarch                                       1\/1 \r\n\r\nInstalled:\r\n  fpaste.noarch 0.3.8.1-1.fc23                                                         \r\n\r\nComplete!\r\n<\/pre>\n<p>Now we will see some ways on how to use\u00a0<strong>fpaste<\/strong>\u00a0from terminal.<\/p>\n<p>You can paste a\u00a0<strong>test.txt<\/strong>, as follows:<\/p>\n<pre><strong># fpaste test.txt<\/strong>\r\n\r\nUploading (1.9KiB)...\r\nhttp:\/\/ur1.ca\/ofuic -&gt; http:\/\/paste.fedoraproject.org\/313642\/34569731\r\n<\/pre>\n<p>To use a\u00a0<strong>nickname<\/strong>\u00a0and\u00a0<strong>password<\/strong>\u00a0while pasting\u00a0<strong>test.txt<\/strong>, run this command.<\/p>\n<pre><strong># fpaste test.txt -n \u201clabmaster\u201d --password \u201clabmaster123\u201d test.txt<\/strong>\r\n\r\nUploading (4.7KiB)...\r\nhttp:\/\/ur1.ca\/ofuih -&gt; http:\/\/paste.fedoraproject.org\/313644\/57093145\r\n<\/pre>\n<p>To send a script file named\u00a0<code>test_script.sh<\/code>, specify the language as\u00a0<strong>bash<\/strong>, copy the returned URL link to the\u00a0<strong>X<\/strong>\u00a0clipboard and make the paste private as follows.<\/p>\n<pre><strong># fpaste -l bash --private --clipout test_script.sh<\/strong> \r\n\r\nUploading (1.9KiB)...\r\nhttp:\/\/ur1.ca\/ofuit -&gt; http:\/\/paste.fedoraproject.org\/313646\r\n<\/pre>\n<p>To send the output of the\u00a0<code>w<\/code>\u00a0command, run this command.<\/p>\n<pre><strong># w | fpaste <\/strong>\r\n\r\nUploading (0.4KiB)...\r\nhttp:\/\/ur1.ca\/ofuiv -&gt; http:\/\/paste.fedoraproject.org\/313647\/53457312\r\n<\/pre>\n<p>To send your system information with a description and a confirmation, run this command below.<\/p>\n<pre><strong># fpaste --sysinfo -d \"my laptop\" --confirm -x \"1800\"<\/strong> \r\n\r\nGathering system info .............................OK to send? [y\/N]: y\r\nUploading (19.1KiB)...\r\nhttp:\/\/ur1.ca\/ofuj6 -&gt; http:\/\/paste.fedoraproject.org\/313648\/53457500\r\n<\/pre>\n<p>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;<strong>\u00a0uname -a<\/strong>,\u00a0<strong>date<\/strong>\u00a0and\u00a0<strong>who<\/strong>.<\/p>\n<pre><strong># (uname -a ; date ; who ) | fpaste --confirm -x \"1800\"<\/strong> \r\n\r\nLinux 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\r\nFri Jan 22 15:43:24 IST 2016\r\nroot     tty1         2016-01-22 15:24\r\nroot     pts\/0        2016-01-22 15:32 (192.168.0.6)\r\n\r\nOK to send? [y\/N]: y\r\nUploading (0.4KiB)...\r\nhttp:\/\/ur1.ca\/ofujb -&gt; http:\/\/paste.fedoraproject.org\/313649\/14534576\r\n<\/pre>\n<p>You can use many other options of fpaste in man pages.<\/p>\n<pre># man fpaste\r\n<\/pre>\n<h3>Summary<\/h3>\n<p><strong>fpaste<\/strong>\u00a0is 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.<\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/fpaste-tool-for-sharing-errors-and-commandline-output-to-pastebin\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/fpaste-a-tool-for-sharing-errors-and-commandline-output-to-pastebin\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;fpaste \u2013 A Tool for Sharing Errors and Commandline Output to Pastebin&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12769","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12769"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12769\/revisions"}],"predecessor-version":[{"id":12770,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12769\/revisions\/12770"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}