<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yosua Hanjaya on Medium]]></title>
        <description><![CDATA[Stories by Yosua Hanjaya on Medium]]></description>
        <link>https://medium.com/@yosuahanjaya?source=rss-1d739ebf38cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vUirNyZ24XelpJD4</url>
            <title>Stories by Yosua Hanjaya on Medium</title>
            <link>https://medium.com/@yosuahanjaya?source=rss-1d739ebf38cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:26:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yosuahanjaya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Everything about Tar]]></title>
            <link>https://towardsdev.com/everything-about-tar-e6b759aa7994?source=rss-1d739ebf38cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6b759aa7994</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[archive-file]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Yosua Hanjaya]]></dc:creator>
            <pubDate>Fri, 06 May 2022 13:19:10 GMT</pubDate>
            <atom:updated>2022-07-21T07:17:09.917Z</atom:updated>
            <content:encoded><![CDATA[<h4>Intro</h4><p>.tar ,.tar.gz ,.tar.bz2 . Do you know the difference between all of those extensions?</p><p><strong><em>Tar </em></strong>is an archive file which means it is a container for many files. <strong><em>Tar </em></strong>is used to collect many files as a single file. <br><strong><em>gz </em></strong>is an abbreviation for <strong><em>Gzip, </em></strong>it is a lossless compression algorithm used to compress a file. <br><strong><em>bz2 </em></strong>is an abbreviation for <strong><em>Bzip2, </em></strong>it is also a lossless compression algorithm. The main difference between <em>gzip </em>&amp; <em>bzip2 </em>is the algorithm itself. <em>Gzip </em>can compress a file faster but the size of the compressed file is bigger than <em>Bzip2.</em></p><p>So .tar extensions mean it is an archived file, whether .tar.bz2 &amp; .tar.gz means it is a compressed archive file.</p><h4>Tar Terminal Command</h4><p>tar command on the terminal has many flags, it intimidated me when I first learn about it. I want to share some of the information regarding the most used flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKBMvzaeeYyB1sI4IoPsQA.png" /><figcaption>tar flag cheatsheets</figcaption></figure><p>Those flags can be combined when creating a command on the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLs7eGjVxely0HuS7OFXXA.png" /><figcaption>archiving file</figcaption></figure><p>c indicating that we are going to create a tar file from the specified path, fmeans give the archived filename ofarchivedFileName.tar . v indicating verbose, it will print out the process on the terminal when archiving process going on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZeS3LYrnmx9znScQy69T1w.png" /><figcaption>create a compressed archived file</figcaption></figure><p>use z when using <em>Gzip </em>algorithm, use j when using <em>Bzip2 </em>algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*-ik2Bia9vGtBmzzRGVXOUg.png" /></figure><p>x indicate that you are going to untar the files. you can use the same command for both archived and compressed archived files. f in this case, indicates what file you are going to untar. -C indicates the path you want your files to be collected after untar process is done. By default untar process will collect your data in the current directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*lu9D4DQMJTMO7uTq3XTEtQ.png" /><figcaption>list the data inside archived files</figcaption></figure><p>t indicates that you are going to see the data inside the archived files. tvf inspect the data recursively, which means if there is a folder inside the archived file, it will inspect all the data inside of it. ls -l inspect the data inside the archived file only. It won’t look recursively inside the folder (if there are any).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*QTdgHgYf5vvQrPPAXNdsVA.png" /><figcaption>unarchiving certain file</figcaption></figure><p>you can also extract only certain files (not all of them). The flags are slightly different based on the type of extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4PmWHk0l_e9goYhowfhjPA.png" /><figcaption>unarchiving multiple files</figcaption></figure><p>You can also unarchive multiple files using double-quote syntax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*9Rnzzr_HjgigpMJUM2JwFA.png" /><figcaption>unarchiving group of data using wildcard</figcaption></figure><p>you can also extract data with certain pattern names using --wildcard flags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*W-mOc1NYitoIcEj4qNKLew.png" /><figcaption>appending data inside archived file</figcaption></figure><p>You can also add data inside the archived files using r flag. One thing to remember here is that we <strong>CAN NOT </strong>add data to the compressed archived file. So make sure that you use r flag only on .tar files.</p><h4>Split Feature</h4><p>There is another feature that works well with the tar command. It is Split command. It helped us split big data into small pieces chunks. It helps when we are going to send the data over the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*koYtyvzZguU8qZmyt7TI9w.png" /><figcaption>splitting example</figcaption></figure><p>Assume we want to send the data inside /app/data . Supposed that the data is too big so we want to divide it into some pieces of small chunks. So after we compressed the archived file using <em>Bzip2 </em>algorithm. We split it by 10 Megabytes using split -b 10M command. Data that has been separated will be named archivedFile.tar.bz2.part** , you can specify the pattern that you wish using double-quote syntax in the last command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3F2W5nEyls23Ocjt63uShQ.png" /><figcaption>combined command for archiving and spliting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJlaJ4gxP0fFSXBU_-NsuA.png" /><figcaption>combining chunk files into one file</figcaption></figure><p>You can merge all chunks files before into one file using cat command. Using split data can help a lot when sending data over the internet, especially when the bandwidth is slow.</p><h4>Donation</h4><p>If you find this article helpful, and you want to support me to upload more content like that, you can buy me a coffee by clicking <a href="http://paypal.me/hanjayasuryalim">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6b759aa7994" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/everything-about-tar-e6b759aa7994">Everything about Tar</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Golang Version Manager]]></title>
            <link>https://towardsdev.com/golang-version-manager-b756085f4e8e?source=rss-1d739ebf38cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b756085f4e8e</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[version-management]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Yosua Hanjaya]]></dc:creator>
            <pubDate>Thu, 05 May 2022 12:00:52 GMT</pubDate>
            <atom:updated>2022-07-21T07:16:46.059Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Intro</strong></h3><p>During my journey as a junior software engineer, sometimes I found a bug that drives me insane in order to solve it. One of them is version compatibility. It took me long hours to solve the issues.</p><p>But solving hard problems grew me up, I learned quite a lot of information and had a lot of fun when gathering resources from the internet and reading experienced professionals&#39; comments or posts regarding the issue. Because I was saved by a lot of generous people on the internet, I decided to write a medium blog, hoping my writing could also help another confusing <em>me </em>out there.</p><p>So in this article, I want to share some information regarding version control for <em>Golang. </em>If you are a programmer you should probably know about <em>NVM</em> (<em>Node Version Manager</em>). <em>NVM</em> is a tool that helped us change the NodeJS SDK version from one to another easily. I was wondering wouldn’t there be good if there is some kind of <em>NVM version </em>for <em>golang. </em>So I did some research and found these amazing <a href="https://github.com/moovweb/gvm">Github repo </a>.</p><h3>GVM</h3><p>Yes, there is a <em>NVM version </em>for <em>golang, </em>it is called <em>GVM</em> (<em>Golang Version Manager</em>). It worked just like <em>NVM, </em>we can easily switch from one version of golang to another version. We can also set up the integration with IDE like Goland when we switch the version, cool, isn’t it .</p><h4>How to Install</h4><p>if you are using Mac or Linux you can type this in your terminal</p><pre>bash &lt; &lt;(curl -s -S -L <a href="https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)">https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)</a></pre><p>if you are using another terminal like zsh, just change the bash with zsh</p><h4>Usage</h4><p>Here are some usages of <em>GVM</em></p><ul><li>Installing the go version : gvm install go#version <br>for example gvm install go1.18.1</li><li>Check all available versions: gvm listall</li><li>Check all installed version : gvm list</li><li>Using specified go version : gvm use go#version <br>for example gvm use go1.17.5 , if you only have one type of go x.17 you can just type gvm use 17</li><li>Set up packages for certain go versions: <br>you need to switch to that version first gvm use 18 <br>and then gvm pkgset #name , for example gvm pkgset go18 , and you need to activate it gvm pkgset use go18 . Now, your go version is 1.18.1 and you are using new package directory which is go18. you can also delete the pkgset using gvm pkgset delete go18</li><li>Uninstall gvm : gvm implode</li></ul><h4>Integration with IDE</h4><p>If you are using Goland, you can integrate the SDK by clicking Preferences &gt; Go &gt; goroot now you have to set the path to the $HOME/.gvm/go&lt;version&gt;/bin/go , you can use user interface to set this path, but don’t forget to show hidden files first. All configuration of GVM is stored in directory named .gvm</p><h4>End</h4><p>I hope a little knowledge that I share above could mean something for you readers. <em>Good luck.</em></p><h4>Donation</h4><p>If you find this article helpful, and you want to support me to upload more content like that, you can buy me a coffee by clicking <a href="http://paypal.me/hanjayasuryalim">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b756085f4e8e" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/golang-version-manager-b756085f4e8e">Golang Version Manager</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>