<?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 Mohamed Taher Othmen on Medium]]></title>
        <description><![CDATA[Stories by Mohamed Taher Othmen on Medium]]></description>
        <link>https://medium.com/@mohamedtaherothmen2?source=rss-28ce52e4730f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RZit0AZUDnRJ-iXd</url>
            <title>Stories by Mohamed Taher Othmen on Medium</title>
            <link>https://medium.com/@mohamedtaherothmen2?source=rss-28ce52e4730f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 02:16:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohamedtaherothmen2/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[Beginner’s Guide to Linux: Part II]]></title>
            <link>https://medium.com/@mohamedtaherothmen2/beginners-guide-to-linux-part-ii-30fb04c904d?source=rss-28ce52e4730f------2</link>
            <guid isPermaLink="false">https://medium.com/p/30fb04c904d</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <dc:creator><![CDATA[Mohamed Taher Othmen]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 22:21:56 GMT</pubDate>
            <atom:updated>2023-01-20T22:21:56.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jvBlgvZq5QgU77ThdvfRzA.jpeg" /></figure><p>In the previous course, we took a look at Lunix history and a bunch of Linux commands. In this part, we will take a look on more Linux commands.</p><h3><strong>ln</strong></h3><p>The <strong>ln</strong> command is used to create links. What is a link? It’s like a pointer, used in C/C++, to another file. They’re similar to Windows shortcuts.</p><pre>ln /path/to/source /path/to/link             # creates hard link<br>ln -s /path/to/source /path/to/link          # creates soft links instead of hard links<br>ln -l /path/to/source /path/to/source        # to verify soft or hard linux</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*VfxcirbJktQclDqylw-1mQ.jpeg" /><figcaption>C/C++ pointer meme haha</figcaption></figure><p>We have two types of links: <strong>hard links</strong> and <strong>soft links</strong>.</p><ul><li><strong>Hard links</strong></li></ul><p>Hard links are rarely used. you can’t link to directories or external filesystems(disks).</p><p>The new hard link we’ll create is identical to the regular file, so any time you edit any of those files, the content will be updated for both.</p><p>But, if you delete the original file, the hard link will still contain the original file content.</p><ul><li><strong>Soft links</strong></li></ul><p>Soft links are different. They are more powerful and more often used, they can link to directories and external filesystems, but when the original is deleted, the soft link will be broken, and the shell will tell you “No such file or directory”.</p><h3><strong>gzip</strong></h3><p>Using the gzip command using <a href="https://en.wikipedia.org/wiki/Main_Page">LZ77 compression protocol</a>, we compress files, and append a <strong>.gz</strong> extension to it. The original file is deleted.</p><pre>gzip file/folder                     # compress and delete original file/folder<br>gzip file.txt <br><br>gzip file1/folder1 file2/folder2     # compress multiple files/folder <br>gzip code1.py code2.py<br><br>gzip -k code1.py code2.py            # -k option to avoid deleting the original file.<br>gzid -d code1.py.gz code2.py.gz      # -d option decompress files</pre><p>You can compress multiple files. Also, using the <strong>-r</strong> option you can compress all the files in a directory recursively. In order to prevent this, we use the <strong>-c</strong> option and use output redirection to write the output to another gzip compressed file.</p><p>There are <a href="https://www.ibm.com/docs/en/linux-on-systems?topic=compression-levels">various levels of compression</a>. The more compression, the longer it will take to compress and the better quality it will be. Levels range from 1(quickest, worst compression) to 9(slowest, better compression).</p><pre><br>gzip -number file/folder       # compress file/folder in various levels<br>gzip -9 file/folder            # compress file/folder in level 9, the slowest and best compression level<br>gzip -1 file/folder            # compress file/folder in level 1, the quickest and worst compression level<br><br>gzip file/foler                # those commands are simillar, default level of compression is 6<br>gzip -6 file/folder</pre><h3><strong>tar</strong></h3><p>Tar command is one of the essential commands in Linux which stands for tape archive and is used to create archives <strong>.tar</strong> and extract the Archive files.</p><pre># The bellow command line creates an archive using -cf, we can archive many files at the same file<br># c option stands for create<br># f option is used to write to file the archive.<br>tar -cvf &lt;archive name&gt;.tar &lt;file(s) or location(s)&gt;<br><br># The bellow command line extract files from an archive using -xf<br># x option stands to extract<br>tar -xvf &lt;archive name&gt;.tar &lt;file(s) or location(s)&gt;<br><br># To create a compressed gzip archive file we use the option z<br>tar -cvzf &lt;archive name&gt;.tar.gz &lt;file(s) or location(s)&gt;<br>tar -cvzf &lt;archive name&gt;.tgz &lt;file(s) or location(s)&gt;</pre><h3><strong>alias</strong></h3><p>It’s common to always run a program with a set of options you like using, it’s like creating your own commands.</p><p>To create an alias, you need to type word alias then use the name you wish to use to execute a command followed by <strong>= </strong>sign and quote the command you wish to alias. But if you open a new Terminal session, the alias will no longer be available. In order to keep aliases between sessions, you can save them in the shell configuration file. Then save by typing <strong>source ~/.bashrc</strong></p><pre>alias          # You can see a list of defined aliases by simply executing alias command.</pre><p>⚠️ It’s simple to access your bash file, type <strong>vim ~/.bashrc</strong> in Terminal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30fb04c904d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner’s guide to Linux : Part I]]></title>
            <link>https://medium.com/@mohamedtaherothmen2/beginners-guide-to-linux-part-i-751a5132583f?source=rss-28ce52e4730f------2</link>
            <guid isPermaLink="false">https://medium.com/p/751a5132583f</guid>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Mohamed Taher Othmen]]></dc:creator>
            <pubDate>Wed, 18 Jan 2023 22:41:43 GMT</pubDate>
            <atom:updated>2023-09-08T01:28:32.218Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beginner’s guide to Linux : Part I</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*UtO6HM0eMtki4H4TkVh-8Q.png" /></figure><p>The Linux “core” (also called Kernel) was born in 1991 as a personal project by Finnish student Linus Torvalds. It went on a deep way from its humble beginnings to become the most famous open Source and free operating system, on which many prestigious operating systems like Android were built.</p><p>Like Windows and macOS, Linux is an operating system. It powers the majority of the servers.</p><h3>Why Linux ?</h3><p>There’s one thing about Linux that corporations like Microsoft and Apple, or Google, will never be able to offer “the ultimate freedom” : you can do whatever you want with your computer.</p><p>Linux is also special because there’s not just “one Linux”, like it happens on Windows or macOS. Instead, we have many distributions(Kali Linux, Ubuntu, …).</p><h3>Basic Linux Commands :</h3><h3>man</h3><p>Every time I forget how to use a command, I use <strong>man </strong>to get the manual. It’s the key to Terminal wisdom. Man pages are essential, they contain so much important information.</p><pre>man &lt;command&gt;<br>man ls<br>man pwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*9qNYNaqUYahUtpobA-6GWA.png" /><figcaption><strong>ls </strong>manual pages</figcaption></figure><h3>ls</h3><pre>ls                       # list all the files within a directory<br><br>ls /&lt;folder name&gt;        # list all the files within &lt;directory name&gt;<br>ls /home<br><br>ls -al /&lt;folder name&gt;    # this command return much more information : <br>                         # File perissions<br>                         # Number of links to that file<br>                         # Owner<br>                         # Size in bytes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fADLZH_5SmrLIcJANHmzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O1NsL5aeuAKZGIXm3Huv9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHUy9HDBt5TNu5I-kLLrzg.png" /></figure><h3><strong>cd</strong></h3><p><strong>cd</strong> means change directory. Once you have a folder or an entire path, you can move into it using the cd command.</p><p>You can jump back to the parent folder using <strong>..</strong> .</p><p><strong>⚠️ The # character indicates the start of the comment, which lasts for the entire line after it’s found.</strong></p><pre>cd /&lt;directory name&gt;        # Used to change the current active directory.<br>cd /bin                     # Change the working directory to /bin</pre><h3>pwd</h3><p>Show the current working directory in case you feel lost</p><pre>pwd                         # It prints the path of the working directory, starting from the root. </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxUebuKUGxw0h3zx9RhENw.png" /></figure><h3><strong>mkdir</strong></h3><p>You create folders using mkdir command, you can multiple folders with one command.</p><p>By adding <strong>-p</strong> option we create multiple nested folders.</p><pre>mkdir newdir                # creates new directory named newdir<br>mkdir newdir1 newdir2       # creates multiple directories<br><br>mkdir -p newdir/nested_dir  # creates nested directory within newdir</pre><h3><strong>rmdir</strong></h3><p>You delete folders using the<strong> rmdir</strong> command.</p><p>To delete folders with files in them, we’ll use the more generic rm command which deletes files and folders, using the <strong>-rf </strong>options.</p><p><strong>⚠️</strong> There is no<strong> bin </strong>when removing files from<strong> Terminal</strong>.</p><pre>rmdir newdir            # delete directory, newdir<br>rmdir newdir1 newdir2   # delete multiple directory, remdir1 and remdir2<br><br>rm -rf newdir           # remove non-empty folders and its content recursively<br>                        # -rf option doesn’t ask for confirmation, so be careful when you use it.</pre><h3><strong>mv</strong></h3><p>You move files/folders using the <strong>mv</strong> command. You specify the file/folder current path and its new path.</p><p>We can also rename files/folders using <strong>mv</strong>.</p><pre>mv dir1 dir2 newdir   # move dir1 &amp; dir2 folders into newdir folder<br>mv newdir newfolder   # renames newdir folder to newfolder <br></pre><h3><strong>cp</strong></h3><p>You copy a file from one location to another using this command.</p><pre>cp file.txt /newdir            # copy file.txt into newdir directory<br>cp -r ./dir1/folder/ ./dir2    # This command will recursively copy the folder directory in ./dir1/ as well as all files in the folder directory<br></pre><p>To copy folders you need to add the <strong>-r </strong>option to copy the whole folder contents.</p><h3><strong>touch</strong></h3><p>You open files/folders and run applications using this command.</p><pre>touch code.py           # creates a file in current directory.</pre><h3><strong>cat</strong></h3><p>The <strong>cat</strong> command is super powerful. It prints a file’s content as an output. Except you can also add content to a file.</p><pre>cat code.py                            # Prints content of code.py <br><br>cat file1.txt file2.txt &gt; file3.txt    # Prints content of text files file1 and file2 into file3.txt<br>cat file1.txt &gt;&gt; file2.txt             # Append the content of file1.txt to file2.txt<br><br>cat -n code.py                         # Prints content of code.py enumerated (-n)</pre><p><strong>⚠️ cat </strong>is often used in combination with the pipe operator <strong>|</strong> to feed file content as input to another command.</p><h3><strong>find</strong></h3><p>You find files or folders matching a particular search pattern.</p><pre>find &lt;folder name&gt; -name &#39;*.&lt;extension&gt;&#39;    # Find all the files under the current tree that have the &lt;extension&gt; and print the relative path of each matching<br>find &lt;folder name&gt; -type d -name &lt;name&gt;     # Find directories under the current tree matching &lt;name&gt;<br>                                            # -type f to search only files<br>                                            # -type l to only search symbolic links.<br>find &lt;folder name&gt; -type d -name &lt;name1&gt; -or -name &lt;name2&gt;    # Find &lt;folder name&gt; -type d -name &lt;name1&gt; -or -name &lt;name2&gt;</pre><p>Part II: <a href="https://medium.com/@mohamedtaherothmen2/beginners-guide-to-linux-part-ii-30fb04c904d">Beginner’s Guide to Linux: Part II | by Mohamed Taher Othmen | Jan, 2023 | Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=751a5132583f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>