<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Salishoma</title>
    <description>The latest articles on DEV Community by Salishoma (@salishoma).</description>
    <link>https://dev.to/salishoma</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1033941%2F65e1169a-3b28-4300-95ae-2f252d813f29.png</url>
      <title>DEV Community: Salishoma</title>
      <link>https://dev.to/salishoma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salishoma"/>
    <language>en</language>
    <item>
      <title>Hoisting in JavaScript</title>
      <dc:creator>Salishoma</dc:creator>
      <pubDate>Mon, 06 Mar 2023 13:11:48 +0000</pubDate>
      <link>https://dev.to/salishoma/hoisting-in-javascript-3ngd</link>
      <guid>https://dev.to/salishoma/hoisting-in-javascript-3ngd</guid>
      <description>&lt;p&gt;JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables or classes to the top of their scope, prior to execution of the code. Before execution, code is scanned for variable declaration, and for each variable, a new property is created in the variable environment object. The variable types in JavaScript have different ways in which they are hoisted. For instance, a variable declared with var is hoisted at the start of the function in which it is declared. When you try accessing the variable before its declaration, let's say for instance we console log the variable before declaration, a value of undefined is printed to the console.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function food() {
    console.log(rice);
    const num = 2;
    if (num === 2) {
       var rice = "Rice";
    }
}
food()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the above, value logged to the console will be undefined. Variable declared with var are function scoped, this means they can be accessed anywhere within the function they are defined.&lt;/p&gt;

&lt;p&gt;Variable declared as let and const are block scoped, but they can only be accessed after they have been declared. The points within the block and above the declaration where they cannot be accessed is called the Temporal Dead Zone(TDZ). When you try accessing them within these zones, you will get an Uncaught ReferenceError: Cannot access the variable before initialization. This implies that they are not hoisted but rather can be accessed from the point of declaration to the end of their block.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function food() {
    const num = 2;
    if (num === 2) {
       console.log(rice);
       let rice = "Rice";
    }
}
food()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught ReferenceError: Cannot access 'rice' before initialization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When rice variable is accessed above and outside the if block, the error will be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught ReferenceError: rice is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;functions declarations are block scoped when using strict mode, but function scoped otherwise. They can be accessed above or below the point where they are declared with their initial value been the actual value of the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum(2, 3);
function sum(a, b) {
    return a + b;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From the code above, the function was called before it was declared, the result returned will be 5.&lt;/p&gt;

&lt;p&gt;with function expression, when a function is expressed with var keyword, and it is called before its declaration, it will return an Uncaught error. e.g.,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum(2, 3);
var sum = function (a, b) {
    return a + b;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The display in the console will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught TypeError: sum is not a function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason being that since sum returns undefined when accessed before declaration, then sum(2, 3) is the same as writing undefined(2, 3) which leads to a TypeError. If you use let instead of var, you will get a ReferenceError.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum(2, 3);
let sum = function (a, b) {
    return a + b;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The display in the console will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uncaught ReferenceError: sum is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The error the function expression returns depends on what variable type you used to assign to the function.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Learn Basic Linux Commands pt.1</title>
      <dc:creator>Salishoma</dc:creator>
      <pubDate>Mon, 27 Feb 2023 11:48:14 +0000</pubDate>
      <link>https://dev.to/salishoma/learn-basic-linux-commands-pt1-52f</link>
      <guid>https://dev.to/salishoma/learn-basic-linux-commands-pt1-52f</guid>
      <description>&lt;p&gt;Linux is a family of open-source Unix operating systems based on the Linux Kernel. They include Ubuntu, Debian, Fedora, Red Hat etc. As developers, we have used linux commands when we interact with the terminal. It might be by creating files and directories, deleting them, moving from one folder to another, checking list of files and folders in a particular folder etc. This implies that linux commands plays very important roles in the lives of developers. Without further ado, let's check out some of the common linux commands and their uses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ls&lt;/strong&gt;&lt;br&gt;
This is used to list the files and directories in a the current folder. You can use several options on this ls command; ls -a (ls with the option a) is used to list all files (including hidden files) in the current working directory. The hidden files starts with a .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another option is the l flag. The l flag is used to show more details about each of the files and directories(such as the permissions) in the current folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The information displayed by the ls -l flag is shown below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_Ebz0qS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmwxlsw46e7g6umvkpq3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_Ebz0qS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmwxlsw46e7g6umvkpq3.png" alt="List files and directories with l flag" width="880" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are other options such as h, s, S, t, r, R etc. These options can also be combined together, e.g., ls -al list all the files with their permissions and other info. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pwd&lt;/strong&gt;&lt;br&gt;
This command is used to show the path of the current working directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sample output is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IB3H-Auh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o7tqf16wrgn7y6t2c1a3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IB3H-Auh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o7tqf16wrgn7y6t2c1a3.png" alt="Print working directory" width="880" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd&lt;/strong&gt;&lt;br&gt;
cd is used to change the path from the current working directory to another directory specified. If no argument is specified, the directory's path is changed to the root directory. To change path to a specific directory, specify the path(absolute or relative) of the directory you are moving to.&lt;br&gt;
From the example below, the current working directory is sample. To move to another directory inside sample e.g., another, we write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd another
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is shown below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jsNlqpGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjoiyiasaphg2l1g6tcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jsNlqpGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjoiyiasaphg2l1g6tcq.png" alt="Change directory" width="880" height="515"&gt;&lt;/a&gt;&lt;br&gt;
To move back one step to parent directory use the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;touch&lt;/strong&gt;&lt;br&gt;
The touch command is used to create a file if it does not exist. If it already exist, the touch command updates the file access and modification timestamps to the current date.&lt;br&gt;
We will create a file file1.txt in the sample folder. Let's first check if the file exists in sample folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nfP7d2A8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtnq7n8plrugzfgng6py.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nfP7d2A8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtnq7n8plrugzfgng6py.png" alt="List file in sample folder" width="880" height="502"&gt;&lt;/a&gt;&lt;br&gt;
From the above we can see the files inside sample folder along with their timestamps. Let's create the file1.txt&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch file1.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's list the files and folders in sample.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lG81Wx2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h8y5q85idbssk1ubhg8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lG81Wx2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h8y5q85idbssk1ubhg8h.png" alt="List files in sample after creating file1.txt" width="880" height="195"&gt;&lt;/a&gt;&lt;br&gt;
From the image above, we can see that file1.txt is now present, and we can also see its timestamp. Let's try creating file1.txt again and observe its timestamp.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T272fXx8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q1e2cljohrx82zd5o8fg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T272fXx8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q1e2cljohrx82zd5o8fg.png" alt="Difference in timestamps" width="880" height="374"&gt;&lt;/a&gt;&lt;br&gt;
From the above, we can see the difference in the two timestamps of file1.txt before and after the touch command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir&lt;/strong&gt;&lt;br&gt;
This command is used to create a directory if they do not exist. If the directory exists, an error message mkdir: : File exists will be displayed.&lt;/p&gt;

&lt;p&gt;let's create a directory called test.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uqJBqyHg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj5k5uggxzcm5hczc9zu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uqJBqyHg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj5k5uggxzcm5hczc9zu.png" alt="Create a new directory" width="880" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above, we can see the directory was successfully created by using ls command to check. Let's see what happens if we try creating the test directory again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ux3TBndw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hr4i5x84hp8o1s05dgo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ux3TBndw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hr4i5x84hp8o1s05dgo3.png" alt="Try create an existing directory" width="770" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output above shows that an already created directory in a folder cannot be created again with the mkdir command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rm&lt;/strong&gt;&lt;br&gt;
The rm command is used to remove a file or directory. to remove a file, we specify the command with the name of the file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YVQEhKVS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qngjws3ko72vawoni2ta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YVQEhKVS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qngjws3ko72vawoni2ta.png" alt="Remove file" width="880" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above, we can see that file1.txt no longer exists after executing the rm file1.txt.&lt;/p&gt;

&lt;p&gt;To remove a folder, we specify the rm with a r flag. The r flag means remove recursive, and this removes all files, directories, and subdirectories contained in the specified directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BfqbUrWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aob6j458avf9wjexi2x5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BfqbUrWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aob6j458avf9wjexi2x5.png" alt="Remove directory" width="880" height="271"&gt;&lt;/a&gt;&lt;br&gt;
The output above shows that the folder has been removed successfully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cp&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The cp command is used to copy file(s) from one location to another. The original file copied remains unaffected in its location. To copy file.txt to another folder, say another2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp file.txt another2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2KGE29Se--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ev1qujmuei4gxhc17jl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2KGE29Se--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ev1qujmuei4gxhc17jl.png" alt="Copy file" width="880" height="371"&gt;&lt;/a&gt;&lt;br&gt;
From the above, we can see that the file was copied to another2 while the original file remain unaffected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mv&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The mv command is used to move a file or directory from one place to another or to rename it. In this case, the moved file will no longer exists in its original location. To move a file from a particular folder to the parent of that folder, we use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mv file2.txt ../
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y8vmJ0-F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lft7wxjmsyhv1dje1int.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y8vmJ0-F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lft7wxjmsyhv1dje1int.png" alt="Move file" width="880" height="349"&gt;&lt;/a&gt;&lt;br&gt;
From the above, we can see that file2.txt was moved from another2 to its parent folder sample.&lt;br&gt;
N.B.: ../ means move up to parent folder&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cat&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It reads data from a file and gives the content as output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--txdxcJcb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5dlvnrtfe8kozskiryr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--txdxcJcb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5dlvnrtfe8kozskiryr.png" alt="Display content" width="686" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;echo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is used to display a line of string/text that is passed as the arguments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GKIF4Vff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnam4tpmj5hdwrgepdgq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GKIF4Vff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnam4tpmj5hdwrgepdgq.png" alt="echo" width="738" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;output redirection operator &amp;gt; and &amp;gt;&amp;gt;&lt;/strong&gt;&lt;br&gt;
both &amp;gt; and &amp;gt;&amp;gt; are used to redirect output to a file. The &amp;gt; is used to overwrite an already existing file or to create a new file (if the file does not exist).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KLl-VFTj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36expnuyj6ozhtwzfssn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KLl-VFTj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36expnuyj6ozhtwzfssn.png" alt="&amp;gt; output redirect" width="880" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &amp;gt;&amp;gt; symbol is used to create new file or append to the already existing file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HTfYJTaV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j8mtyf5rgsx8v062jc7s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HTfYJTaV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j8mtyf5rgsx8v062jc7s.png" alt="&amp;gt;&amp;gt; output redirect" width="880" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
