<?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>Forem: Shivam</title>
    <description>The latest articles on Forem by Shivam (@shivam164).</description>
    <link>https://forem.com/shivam164</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%2F786254%2F5ef92c99-79f7-435c-aabc-29e5ad840b55.jpg</url>
      <title>Forem: Shivam</title>
      <link>https://forem.com/shivam164</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shivam164"/>
    <language>en</language>
    <item>
      <title>Learn CI/CD Pipelines with GitHub Actions 🤗</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Sat, 15 Apr 2023 15:31:42 +0000</pubDate>
      <link>https://forem.com/shivam164/learn-cicd-pipelines-with-github-actions-28fh</link>
      <guid>https://forem.com/shivam164/learn-cicd-pipelines-with-github-actions-28fh</guid>
      <description>&lt;p&gt;Software Development has evolved a lot, and Continuous Integration and Continuous Deployment (CI/CD) play a significant role in it. When we talk about CI/CD, there are two primary tools that we talk about. First is GitHub Actions and second is Jenkins.&lt;/p&gt;

&lt;p&gt;In this blog, I will be taking you through the following things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understanding CI/CD.&lt;/li&gt;
&lt;li&gt;How GitHub Actions work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Understanding CI/CD
&lt;/h3&gt;

&lt;p&gt;CI/CD is Continuous Integration and Continuous Deployment. To understand these terms let’s look at the following workflow diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwps8vtqafvga8xlwceh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwps8vtqafvga8xlwceh.png" alt="CI/CD"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the bird's eye view of the CI/CD pipeline. Developer writes some code and pushes it to the remote repository, which is in most cases handled by GitHub. From GitHub, application code goes through the build and test processes in some remote machines. Build and Test processes comes in a continuous integration phase. In the continuous deployment phase build and test code in used to create docker images, which can later be used to create containers, which are used for Kubernetes Cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  How GitHub Actions is used for CI/CD
&lt;/h3&gt;

&lt;p&gt;GitHub Actions is a tool that does certain actions on the occurrence of a particular kind of event. An event can be a push to the repository, an issue raised, a pull request, a first contribution, etc. Any event that can be recognized by GitHub can be used to trigger some action. To see all possible events check out GitHub Action &lt;a href="https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows" rel="noopener noreferrer"&gt;events&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We tell GitHub Action what to do and when to use YAML files. Inside the YAML file, we write workflow. Simply a workflow is a collection of job definitions that will be executed concurrently as well as sequentially. A job consists of several steps which will be executed sequentially. By default, jobs run in parallel, but we can specify the dependence of one job on another, then the dependent job will start only when the job on which it depends on finishes its work.&lt;/p&gt;

&lt;p&gt;To better understand the workflow look at the diagram below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6owx9272axtgoeksg88.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6owx9272axtgoeksg88.png" alt="Dependency GitHub Actions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Location to store YAML file in GitHub
&lt;/h3&gt;

&lt;p&gt;All the YAML files related to GitHub workflow&lt;/p&gt;

&lt;h3&gt;
  
  
  How to write workflow in the YAML file
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Comments:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can write comments by starting the line with a ‘#’.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18ql8al72fy6woba7pw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18ql8al72fy6woba7pw6.png" alt="Comments YAML"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;name&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;We can start by giving workflow a name using the ‘name’ keyword, although it is not must to have it. If you do not provide a name to the workflow it will take the name as the name of the YAML file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;on&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Using the ‘on’ keyword we can specify the type of actions on which certain task has to be performed. We can only specify this only at one place in the code, i.e. you cannot have two ‘on’ in the file.&lt;/p&gt;

&lt;p&gt;Ways of writing content inside ‘on’ section:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;on: push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;on: [push, pull_request]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# events on which actions should be triggered
on:
  push:
    branches: [ "main" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out more ways of writing this &lt;a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Generally, it comes just after the name in the workflow file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;env&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Inside the env section, you can specify some key-value pairs, which can be used later inside the file. For a value, you cannot use a key inside the env section.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="nl"&gt;env:&lt;/span&gt; 
    &lt;span class="n"&gt;ARTIFACT_NAME&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Shivam&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When there is more than one environment variable with the same name, GitHub uses the more specific one. We will see how this works in the later example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;jobs&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;We can write one or more jobs inside the workflow file. By default, jobs run in parallel, but we can also set some dependencies between the jobs, so that if one job is dependent on another then it will only start executing when the job on which it depends finishes its work.&lt;/p&gt;

&lt;p&gt;Way of writing jobs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="nl"&gt;jobs:&lt;/span&gt;
    &lt;span class="n"&gt;job1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="n"&gt;identifier&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Job1&lt;/span&gt;
    &lt;span class="n"&gt;job2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Job2&lt;/span&gt;
    &lt;span class="n"&gt;job3&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Job3&lt;/span&gt;
        &lt;span class="n"&gt;needs&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;job2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the script above, we have specified three jobs with identifiers and names. We must have an identifier for the job but the name is not always required. In job3, it is mentioned that it depends upon the job2, which means it will start executing only when the job2 finishes its work.&lt;/p&gt;

&lt;p&gt;Inside the job, we mention a few other things like runs-on and steps. Runs on tell the workflow on which virtual machine this job has to be performed and the steps inside the jobs section tell the steps with which the job will be performed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;steps&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;A job contains a sequence of tasks called steps. Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry.&lt;/p&gt;

&lt;p&gt;‘uses’ and ‘run’ are used under jobs to tell the command or action to be performed.&lt;/p&gt;

&lt;p&gt;We can also use ‘env’ under jobs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;steps:
      - name: Print a greeting
        env:
          MY_VAR: Hi there! My name is
          FIRST_NAME: Shivam
          MIDDLE_NAME: Kumar
          LAST_NAME: Pandey
        run: |
          echo $MY_VAR $FIRST_NAME $MIDDLE_NAME $LAST_NAME.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From what we have learned till now let us see how we can write files for continuous integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Continuous Integration with GitHub Action
&lt;/h3&gt;

&lt;p&gt;Let’s have a look at the following YAML file. I have taken the example given below from GitHub page itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;GitHub&lt;/span&gt; &lt;span class="nx"&gt;Actions&lt;/span&gt; &lt;span class="nx"&gt;Demo&lt;/span&gt;
&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;actor&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;testing&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="nx"&gt;GitHub&lt;/span&gt; &lt;span class="nx"&gt;Actions&lt;/span&gt; &lt;span class="err"&gt;🚀&lt;/span&gt;
&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nx"&gt;Explore&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;GitHub&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Actions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nx"&gt;runs&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ubuntu&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;latest&lt;/span&gt;
&lt;span class="nx"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;🎉 The job was automatically triggered by a ${{ github.event_name }} event.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Check&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="nx"&gt;repository&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt;
&lt;span class="nx"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;actions&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;v3&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;💡 The ${{ github.repository }} repository has been cloned to the runner.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;🖥️ The workflow is now ready to test your code on the runner.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;List&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;repository&lt;/span&gt;
&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="nx"&gt;ls&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;workspace&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;echo&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;🍏 This job's status is ${{ job.status }}.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look at all the keywords of the above GitHub action file. Starting with &lt;/p&gt;

&lt;p&gt;&lt;code&gt;name&lt;/code&gt; using the name we are giving the name to this GitHub workflow as GitHub Actions Demo.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;run-name&lt;/code&gt; using the run-name we give the workflow runs a name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;on&lt;/code&gt; using the on, we tell the workflow when to trigger some action.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;jobs&lt;/code&gt; using the jobs, we tell the workflow that whatever is under the jobs keyword will be used to specify how and where the job is going to take place.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;runs-on&lt;/code&gt; using the runs-on, we tell the workflow what kind of virtual machine should be used.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;steps&lt;/code&gt; is containing the sequence of commands that should be run.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;run&lt;/code&gt; is used to specify a single command to run on the virtual machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;uses&lt;/code&gt; is used to specify the location and version of a reusable workflow file to run as a job.&lt;/p&gt;

&lt;p&gt;I hope this will help to kickstart your GitHub action learning.&lt;/p&gt;

&lt;p&gt;To dive deep into GitHub action check out their &lt;a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions" rel="noopener noreferrer"&gt;docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Support it by giving it a like 😊.&lt;/p&gt;

</description>
      <category>cd</category>
      <category>ci</category>
      <category>github</category>
      <category>devops</category>
    </item>
    <item>
      <title>Starting to learn DevOps</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Sun, 05 Mar 2023 18:40:23 +0000</pubDate>
      <link>https://forem.com/shivam164/starting-to-learn-devops-1oc1</link>
      <guid>https://forem.com/shivam164/starting-to-learn-devops-1oc1</guid>
      <description>&lt;p&gt;Hey everyone,&lt;/p&gt;

&lt;p&gt;I am starting a 60-day challenge to learn DevOps technologies.&lt;/p&gt;

&lt;p&gt;This might look like a very short time for many people, but I think this is going to work for me because I already know a lot of technologies and concepts that DevOps require.&lt;/p&gt;

&lt;p&gt;Things that I already know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computer Networking.&lt;/li&gt;
&lt;li&gt;Linux&lt;/li&gt;
&lt;li&gt;Git and GitHub&lt;/li&gt;
&lt;li&gt;Basic knowledge of docker and Kubernetes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I will be following  this roadmap:  &lt;a href="https://roadmap.sh/devops"&gt;https://roadmap.sh/devops&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After every 5 days, I will be writing what I learned. So if you are also thinking of starting to learn DevOps, LETS GOO!! 💪&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Timeline&lt;/strong&gt;:&lt;/p&gt;

</description>
      <category>devops</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Linux Commands easier than ever before 💪</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Thu, 22 Dec 2022 18:21:02 +0000</pubDate>
      <link>https://forem.com/shivam164/linux-commands-easier-than-never-before-26bd</link>
      <guid>https://forem.com/shivam164/linux-commands-easier-than-never-before-26bd</guid>
      <description>&lt;p&gt;The Linux command is a utility of the Linux operating system. When operating Linux, you need to use a &lt;strong&gt;shell&lt;/strong&gt; – a program that gives you access to the operating system’s services. Most Linux distributions use a graphical user interface (GUI), making them beginner-friendly.&lt;/p&gt;

&lt;p&gt;However, we recommend utilizing the command-line interface (CLI) because it’s quicker and offers more control. Tasks that require multiple steps on the GUI can be done in a matter of seconds by entering commands into the CLI&lt;/p&gt;

&lt;p&gt;In this blog, you will learn all the commands that you should know to get comfortable with the terminal.&lt;/p&gt;

&lt;p&gt;To start let’s first understand some basic terms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Command Line Interface ( CLI )&lt;/strong&gt;: A CLI is a text-based user interface to run programs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shell&lt;/strong&gt;: A shell is a piece of software that interprets typed commands and runs them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal&lt;/strong&gt;: A terminal is software that a shell program runs inside of.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What are commands?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Commands are programs that are available on a system. When we run a command, the system takes some specific action. Most of the commands have a short name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;General command syntax:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;command&lt;/span&gt;        &lt;span class="nf"&gt;option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="nf"&gt;argument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We don’t always need to have options and arguments.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;option&lt;/strong&gt; tells the command how to operate.&lt;/p&gt;

&lt;p&gt;ex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;ls&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;

&lt;span class="nx"&gt;ls&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;

&lt;span class="nx"&gt;ls&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;alh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here -l is an option. We can have the option of single characters starting with a dash(-), and multiple single-character options can be written together as shown above in the third command. Options with more than one alphabets start with two dashes(—) and those options cannot be written along with other options.&lt;/p&gt;

&lt;p&gt;You can use —help option to know details about some commands.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;argument&lt;/strong&gt; is where we tell the command what to operate on.&lt;/p&gt;

&lt;p&gt;ex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;ls&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;Documents&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here ./Documents is an argument.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File system in Linux:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmoq8njv5awcl45q26di.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmoq8njv5awcl45q26di.png" alt="Linux File System"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above image shows what the file system looks like in Linux.&lt;/p&gt;

&lt;p&gt;/home is the directory where normal user store files.&lt;/p&gt;

&lt;p&gt;There are two ways to specify a path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Absolute path: An absolute path is defined as specifying the location of a file or directory from the root directory(/).&lt;/li&gt;
&lt;li&gt;Relative path: Relative path is defined as a path relative to the present working directory (pwd).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18pvahbbkk64xog1p0p5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18pvahbbkk64xog1p0p5.png" alt="General CLI notation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image shivam is the username, ASUS is the hostname and ~/Desktop is the present working directory.&lt;/p&gt;

&lt;p&gt;It is good to know the following directory to get a better understanding of how the commands are working.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Root user’s home directory: &lt;code&gt;/root&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;User’s home directory: &lt;code&gt;/home&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Common configuration files reside in: &lt;code&gt;/etc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Common programs and commands in: &lt;code&gt;/bin&lt;/code&gt;, &lt;code&gt;/sbin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Shared libraries and modules: &lt;code&gt;/lib&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Shared location for mounting other file systems: &lt;code&gt;/mnt&lt;/code&gt;, &lt;code&gt;/media&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Kernel and system information: &lt;code&gt;/dev&lt;/code&gt;, &lt;code&gt;/proc&lt;/code&gt;, and &lt;code&gt;/sys&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Some useful keyboard shortcuts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Up and Down arrow keys&lt;/code&gt;&lt;/strong&gt;: Using the up arrow key you can get previously written commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Tab&lt;/code&gt;:&lt;/strong&gt; It comes very handy while writing arguments in a command if there is some directory with a long name then you can press the tab after writing some of the starting portions of the command if that portion uniquely matches with some directory then the tab will autocomplete it for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Tab-Tab&lt;/code&gt;&lt;/strong&gt;: In case you remember only some initial characters of a command, then pressing the tab twice will give a list of commands starting with those characters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Ctrl-A&lt;/code&gt;&lt;/strong&gt;: Move to the beginning of the line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Ctrl-E&lt;/code&gt;&lt;/strong&gt;: Move to the end of the line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Ctrl-Shift-C&lt;/code&gt;&lt;/strong&gt;: Copy text to the clipboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Ctrl-Shift-V&lt;/code&gt;&lt;/strong&gt;: Paste text from the clipboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s start to look into commands now:&lt;/p&gt;

&lt;h2&gt;
  
  
  COMMANDS:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;man&lt;/code&gt;&lt;/strong&gt;: This command is used to open the manual of any other command. &lt;/p&gt;

&lt;p&gt;ex: on typing command &lt;code&gt;man ls&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvka1x1u6rexbnt5fldfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvka1x1u6rexbnt5fldfr.png" alt="man command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;apropos&lt;/code&gt;:&lt;/strong&gt; This command will help you to find the command you want to use. Let’s say you wanted to list everything present in the current directory, but you don’t remember the ls command for it, then using the &lt;code&gt;apropos list&lt;/code&gt; you will get all the commands related to listing things.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl9csvshldsb3egc4cehi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl9csvshldsb3egc4cehi.png" alt="apropos command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pwd&lt;/code&gt;&lt;/strong&gt;: This command is used to know the present working directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglknf0fhwh2vrjq7bilx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglknf0fhwh2vrjq7bilx.png" alt="pwd command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;cd&lt;/code&gt;:&lt;/strong&gt; Changes the shell working directory.&lt;/p&gt;

&lt;p&gt;To move into the folder which has space in its name. &lt;/p&gt;

&lt;p&gt;For example: Let’s say our current working directory is &lt;code&gt;~/Desktop&lt;/code&gt; and there is a folder with the name “folder name”, then in order to change the working directory to &lt;code&gt;~/Desktop/folder name/&lt;/code&gt;, we will need to use the command like this: &lt;code&gt;cd folder\ name&lt;/code&gt;. Here &lt;code&gt;\&lt;/code&gt;  is used to ignore the space between the words. &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihh8e9xaik9io0a0h46s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fihh8e9xaik9io0a0h46s.png" alt="cd command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt;: Lists directory contents.
We can use various useful options with the ls command.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ls -l&lt;/code&gt;: Here -l will tell the ls command to use the long listing format.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -a&lt;/code&gt;: Here -a will tell the ls command to show all the files including hidden, files that start with ‘.’ are hidden files. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -R&lt;/code&gt;: Here -R will tell ls to show all the files recursively i.e. everything that is present in the directory will be printed in the output. If there is a folder inside the current working directory and it has some files inside it, then even those files will be printed as output in this case.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzru73pm4faxphchq1f4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzru73pm4faxphchq1f4.png" alt="ls command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;stat&lt;/code&gt;:&lt;/strong&gt; Displays the status of a file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3rihirbyqw40f90gffh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3rihirbyqw40f90gffh.png" alt="stat command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt;: This will help to create directories&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1gbhmxihdp0hj4dzmsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1gbhmxihdp0hj4dzmsw.png" alt="mkdir command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we can see all the files present in the current working directory were listed. Then we wrote the command &lt;code&gt;mkdir newFolder&lt;/code&gt;which created a new folder in the working directory, which we can see using the ls command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rmdir&lt;/code&gt;: This will help to delete a directory. Writing a command followed by the path name of the directory will delete the directory, but it will work only when the directory is empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd9xps5a8qp5ce3snnom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd9xps5a8qp5ce3snnom.png" alt="rmdir command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see that when the directory is not empty we cannot delete it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcy7qto6i98u58flm1u8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcy7qto6i98u58flm1u8s.png" alt="rmdir command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we can see that we deleted everything from the newFolder folder, then we are able to delete it using the &lt;code&gt;rmdir&lt;/code&gt; command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cp&lt;/code&gt;: This command is used to copy files and folders from one location to other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx9ipdcq979sau82jngg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx9ipdcq979sau82jngg.png" alt="cp command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see that we copied the &lt;code&gt;abc.txt&lt;/code&gt; file from the Desktop to the &lt;code&gt;newFolder&lt;/code&gt; folder present on the desktop.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mv&lt;/code&gt;: This command can be used to move files between different directories. This command can also be used to move files to different directories with different names, which we can also use to rename files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0igmd3zq41t36ijljyig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0igmd3zq41t36ijljyig.png" alt="mv command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see that Desktop has a file with the name abc.txt and newFolder folder doesn’t have anything inside it. Then by using the command mv abc.txt xyz.txt, we are renaming abc.txt to xyz.txt, then by using the command &lt;code&gt;mv xyz.txt newFolder/mno.txt&lt;/code&gt;, xyz.txt is moved to newFolder folder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt;: This command can be used to delete files from directories, we can also use it to delete non-empty directories using the -r option, which could not be done by &lt;code&gt;rmdir&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysi49cbmh5lc8dr8ncqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysi49cbmh5lc8dr8ncqa.png" alt="rm command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see that abc.txt was present in the Desktop directory but after using the command rm abc.txt, it is not there anymore. Similarly, we can see newFolder folder in the Desktop directory with mno.txt file inside it, using the command rm -r newFolder folder newFolder is not there anymore.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find&lt;/code&gt;: This command can be used to search files or folders using options as filters. You can explore this command using man.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjfjhrfh9ecdhlqox5qsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjfjhrfh9ecdhlqox5qsg.png" alt="find command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, using -name option we are able to find files after applying some filter to the search.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-user Environment
&lt;/h2&gt;

&lt;p&gt;Before moving forward let’s understand the multi-user environment in Linux. In a multi-user environment, the system allows keeping the user’s files separate from other users’ profiles.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;whoami&lt;/code&gt;: In order to check which user is currently logged in, we can use whoami command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfg0n43rtezcsrwomaal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfg0n43rtezcsrwomaal.png" alt="whoami command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;su&lt;/code&gt;: This command can be used to substitute the user. One of the uses of switching users is to do system administration tasks. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are generally two kinds of users, Normal users, and Superusers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Super Privileges&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The root is often disabled on the modern Linux system.&lt;/li&gt;
&lt;li&gt;Admin can borrow the root’s privilege using the sudo command.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo&lt;/code&gt;: Root privileges can be borrowed using sudo command followed by a password verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foeq68sq125ktnsse9qj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foeq68sq125ktnsse9qj4.png" alt="sudo command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see that using ls without sudo to see the root folder’s file is not allowed. But on using sudo command followed by the password we can use it.&lt;/p&gt;

&lt;p&gt;To switch to a root user, we can use the -s option after sudo, and to go back to the normal user, you can use the exit command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbmp0pkspran4gd2q4kp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbmp0pkspran4gd2q4kp.png" alt="root user switch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For every file, there are permissions details for three types of users:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;user (owner of the file)&lt;/li&gt;
&lt;li&gt;group (collection of users for whom we can define specific actions)&lt;/li&gt;
&lt;li&gt;others (all other users)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When we write command stat with some file name then we get the details of access related to that file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5ztwks588bu7q90dz2p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5ztwks588bu7q90dz2p.png" alt="stat command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see the Access details: (0664/-rw-rw-r—).&lt;/p&gt;

&lt;p&gt;For -rw-rwr—, first - is to tell that it is a file then the next three characters belong to the user, the next three to the group, and the last three to others.&lt;/p&gt;

&lt;p&gt;There are two methods to represent permission:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Octet (like 755, 644, and 777)&lt;/li&gt;
&lt;li&gt;Symbolic (like r—, rw-, —x)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the symbolic representation, ‘r’ means read, ‘w’ means write, and ‘x’ means to execute. &lt;/p&gt;

&lt;p&gt;If a user has permission rwx, that means he can read, write and execute the file.&lt;/p&gt;

&lt;p&gt;In octet way of writing permission: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changing File Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;chmod&lt;/code&gt;: This command can be used to change the permission of different users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3j60we86xgjjgim1hkqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3j60we86xgjjgim1hkqw.png" alt="chmod command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can use that, the first user in one.txt had permission to read and write only, but after using the command &lt;code&gt;chmod u+x one.txt&lt;/code&gt; it also gets permission to execute.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;chown&lt;/code&gt;: This command can be used to change the file’s owner. This command needs root permission to run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyn0yfuivnuvhap2zi1f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyn0yfuivnuvhap2zi1f.png" alt="chown command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, we can see on writing the command ls -l all the details of file one.txt got outputted and there we can see two shivam written, first shivam is in the place of the user and the second shivam is in the place of the group. On writing the command chown without sudo, we are getting operation not permitted, therefore we are using sudo with chown command, which is changing the user from shivam to root.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Links&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Links are files that reference other files. It is used to avoid having duplicate files. A link establishes a pointer in one place to a destination in another place.&lt;/p&gt;

&lt;p&gt;There are two types of links:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Soft Link: A soft link or symbolic link points to another file.&lt;/li&gt;
&lt;li&gt;Hard Link: A hard link points to specific data on the disk.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ln&lt;/code&gt;: This command is used to create a new link for some file. We can use -s option with ln for soft links followed by the file we want to point to and then the pointer name&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib5y05ibq52cohzs2pzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib5y05ibq52cohzs2pzq.png" alt="ln command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we would not pass any option with the command then the link will be a hard link.&lt;/p&gt;

&lt;p&gt;One thing to note with the soft link is that if we change the location of the file to which the pointer points to then the pointer would not give the correct output or even if the location of the pointer file gets changed, in that case also it would not work. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Commands to read text&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt;: This command displays the contents of one or more files without having to open the file for editing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4mkmira7fbc7hyzvvox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4mkmira7fbc7hyzvvox.png" alt="cat command"&gt;&lt;/a&gt;*&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;head&lt;/code&gt;: This command will output the first 10 lines of the file you give as an argument. But we can also pass the option to get as many lines as you want using the -n option.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6x08yqilqx6dxgx2ggy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz6x08yqilqx6dxgx2ggy.png" alt="head command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tail&lt;/code&gt;: This command is similar to the head command but the only difference is that it will print the last lines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzbcl3dfjw9vl45um7ry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzbcl3dfjw9vl45um7ry.png" alt="tail command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;less&lt;/code&gt;: This command displays the text of one page or screenful at a time and provides navigation control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60bm9bvk7czhyxfmi24s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60bm9bvk7czhyxfmi24s.png" alt="less command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have any suggestions, please write them in the comment section. I would love to add it to the blog. ✌️&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cli</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>How Can I Do Reverse Email Lookup? - 3 Simple Methods</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Wed, 14 Dec 2022 06:38:50 +0000</pubDate>
      <link>https://forem.com/shivam164/how-can-i-do-reverse-email-lookup-3-simple-methods-1eei</link>
      <guid>https://forem.com/shivam164/how-can-i-do-reverse-email-lookup-3-simple-methods-1eei</guid>
      <description>&lt;p&gt;A look at the evolution of the data landscape, how technology is helping businesses solve for now, and how the data analysis possible today can provide us with a new understanding of how we, as a society, can perform better in the future.&lt;/p&gt;

&lt;p&gt;The most dramatic outcome of the digital revolution is the amount of data that is now collected and analyzed.&lt;/p&gt;

&lt;p&gt;In this article, we’ll talk about how you can obtain more data from an email address and the different kinds of data you can get from it. Example of data from an email includes getting contact information about a person or company to verify their authenticity, or collating emails to generate leads for marketing purposes and so on.&lt;/p&gt;

&lt;p&gt;To start with let’s look at. What is a Reverse Email Lookup?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Reverse Email Lookup?
&lt;/h2&gt;

&lt;p&gt;A reverse email lookup is basically a data enrichment process used to uncover more information relating to an email address. It's used to harvest actionable data about a person or entity that can be found online.&lt;/p&gt;

&lt;p&gt;Examples of information you can get from an email address include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finding the owner of the email address&lt;/li&gt;
&lt;li&gt;The country they are based in&lt;/li&gt;
&lt;li&gt;Job information and social media accounts associated with the email&lt;/li&gt;
&lt;li&gt;Phone number, physical address, profile pictures and many more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can help users figure out who might be contacting them via email and for what purpose, especially if it’s an unknown or suspicious email address.&lt;/p&gt;

&lt;p&gt;You can also use it to learn more about the candidates you are hiring or leads (for sales and marketing specialists) you want to convert.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Reverse Email Search Used For?
&lt;/h2&gt;

&lt;p&gt;Considering the type of information you can obtain from performing a reverse email lookup&lt;a href="https://nubela.co/proxycurl/reverse-email-lookup?utm_campaign=writers%20domain&amp;amp;utm_source=website&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;,&lt;/a&gt; the only limit to what you can use it for is your imagination. In this section, I'll break down the different use cases where you may require data and information about an individual or entity using their personal or work emails.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Scams &amp;amp; Fraud Prevention
&lt;/h3&gt;

&lt;p&gt;Reverse email lookup can be used in order to verify the identity of the email sender, whether or not they are legitimate or if they are scammers. And in today's world where there is a proliferation of scams, it's worth worrying about your own security. But luckily, you can use a reverse email lookup to verify the identity of the emails, to further protect yourself from theft and risks.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Know More About A Potential Date
&lt;/h3&gt;

&lt;p&gt;For a more relatable practical day-to-day usage, you can do an email search to find out more about a potential date, learn about their interests and what type of personality they have on social media before actually going on one. ‘Armed’ with enough information, you can quickly determine if it's a date worth going, or you might even identify your one true love even before the date, who knows?&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Verification of Ecommerce Transactions
&lt;/h3&gt;

&lt;p&gt;Finally, one important use case is to check and verify an online buyer or seller especially when e-commerce shopping is so prominent today. With a simple reverse email lookup, you can mitigate your chances of running into scams and also, be protected from transactors with bad track records.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reverse Lookup of &lt;em&gt;Work &amp;amp; Professional Emails&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Another valuable use case where a reverse lookup can be beneficial is verifying work and professional emails. In the same way that personal emails can tell you a lot about a person, a professional's email contains valuable details about their past and present jobs, skills and capabilities, location and more. These details can be used to determine if the person is a good fit for a particular job.&lt;/p&gt;

&lt;p&gt;Many industries benefit from this process of background scrutiny and depend on it heavily in order to find professionals in their field through reverse email searches. Some other scenarios where a reverse email lookup can be applied include:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. HR Talent Identification
&lt;/h3&gt;

&lt;p&gt;Hiring HR recruitment firms gathering all the information available on the candidates and filter them accurately to fast-track the hiring process. Using a simple email search, they can also retrieve relevant information that is not disclosed by the candidates.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Lead Generation
&lt;/h3&gt;

&lt;p&gt;Another great use case is in sales and lead generation. Using a reverse email lookup, sales team can qualify leads accurately, thus cutting down time wasted to work on leads and instead, focus on getting sales quicker and more efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Credit Risks Analysis
&lt;/h3&gt;

&lt;p&gt;Financial firms, especially those that extend credit and loans to their customers, can identify the risk level of a prospective customer before dealing with them based on the data that they are able to obtain from a reverse email lookup.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can I Do Reverse Email Lookup? -3 Simple Methods
&lt;/h2&gt;

&lt;p&gt;Let's look at the different ways in which you can perform a reverse email lookup now that you understand what it is and what it involves. There are three main ways to be covered here, ranging from free to paid to a highly-efficient, automated method. Since all three methods are available for use by anyone, it's entirely up to you to pick which one suits your use case the best.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. FREE Reverse Email Lookup (Google &amp;amp; LinkedIn Search)
&lt;/h3&gt;

&lt;p&gt;The most basic and straightforward way to perform a reverse email lookup is to use &lt;strong&gt;Google&lt;/strong&gt;. As you would do a normal Google search, you can do the same with email addresses. All you have to do is simply input your email in the search bar, and it will return search results with information related to that email.&lt;/p&gt;

&lt;p&gt;Look what you get on entering your email address in google search bar.&lt;/p&gt;

&lt;p&gt;However, this method is very manual and can be time consuming if you happen to be dealing with a large number of email addresses. Most importantly, it's not guaranteed to return an accurate result as an email might not be crawled successfully by Google.&lt;/p&gt;

&lt;p&gt;Another great free alternative to Google is &lt;strong&gt;LinkedIn&lt;/strong&gt;. LinkedIn is a de-facto platform to get information about the professional profile of a person. However, you can‚Äôt perform a reverse email lookup directly in LinkedIn. But you can derive the person's name and company through its email prefix and domain, which you can then use to perform the search according to these two queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Paid Reverse Email Lookup Tools
&lt;/h3&gt;

&lt;p&gt;If you want a more efficient and reliable solution to handle large datasets of email addresses then you may want to consider going for a paid reverse email lookup tool. With paid tools you can quickly gather the data you need which are all scattered online and present them in a manner easy to use. In addition, you can do searches more quickly and accurately, with all the information properly presented in a dashboard or sheet, ready for you to use and act upon.&lt;/p&gt;

&lt;p&gt;There are a lot of paid reverse email lookup tools and services available, so it's up to you to choose what works best for you. One great tool is Spokeo. Spokeo lets you make reverse lookups involving name, addresses and phone, thereby allowing you more ways to obtain data and more data points to utilize.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Automated Reverse Email Lookup Using An API
&lt;/h3&gt;

&lt;p&gt;If you still want something better, something that can integrate seamlessly with your existing business system or application, you can consider going for a reverse email lookup API. With an API, a reverse email lookup process can practically run on its on within your application. The data obtained from the email search can then be fed back automatically into your application, allowing you to utilize the data points immediately for your business without worrying about the lookup process itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nubela.co/blog/3-simple-methods-to-do-reverse-email-lookup/?utm_campaign=writers%20domain&amp;amp;utm_source=social&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Proxycurl&lt;/a&gt; is an excellent tool for obtaining and enriching data about people and companies. One of its many services include a &lt;a href="https://nubela.co/proxycurl/reverse-email-lookup?utm_campaign=writers%20domain&amp;amp;utm_source=website&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Reverse Work Email Lookup API&lt;/a&gt;  which you can use to programmatically pull data into your applications. They excel in data relating to the professional world, a more valuable type of data widely sought after. Another attractive feature of Proxycurl is its agile, lightweight pricing structure, at a cost of as low as $0.03 per search. No bulky monthly subscription that tie you down every month so you only get to pay as you use (or pay as you go if you'd like).&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now you know all about &lt;a href="https://nubela.co/proxycurl/reverse-email-lookup?utm_campaign=writers%20domain&amp;amp;utm_source=website&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;reverse email lookup&lt;/a&gt;, what it is used for, its capabilities and the different tools available out there depending your use case. Will you now choose to integrate it into your current business workflow, or start using it personally to protect yourself against certain risks or fraud?&lt;/p&gt;

&lt;p&gt;Give &lt;a href="https://nubela.co/blog/3-simple-methods-to-do-reverse-email-lookup/?utm_campaign=writers%20domain&amp;amp;utm_source=social&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Proxycurl’s&lt;/a&gt; &lt;a href="https://nubela.co/proxycurl/reverse-email-lookup?utm_campaign=writers%20domain&amp;amp;utm_source=website&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Reverse Work Email Lookup API&lt;/a&gt; a try today.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://nubela.co/blog/3-simple-methods-to-do-reverse-email-lookup/?utm_campaign=writers%20domain&amp;amp;utm_source=social&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Proxycurl&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nubela.co/blog/3-simple-methods-to-do-reverse-email-lookup/?utm_campaign=writers%20domain&amp;amp;utm_source=social&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Proxycurl&lt;/a&gt; products &lt;strong&gt;&lt;a href="https://nubela.co/proxycurl/reverse-email-lookup?utm_campaign=writers%20domain&amp;amp;utm_source=website&amp;amp;utm_medium=review&amp;amp;utm_content=3%20reverse%20email%20lookup"&gt;Reverse Email Lookup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>email</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Understanding Alternative Data and using Proxycurl</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Fri, 04 Nov 2022 10:36:58 +0000</pubDate>
      <link>https://forem.com/shivam164/understanding-alternative-data-and-using-proxycurl-2kcm</link>
      <guid>https://forem.com/shivam164/understanding-alternative-data-and-using-proxycurl-2kcm</guid>
      <description>&lt;p&gt;In recent years, alternative data has been famed in the investment and finance industries. You can’t deny its presence. Companies are using it to speed up their growth as well as to compete in the market. You might be thinking what is alternative data? How is it so important? I am talking about the same in this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Alternative Data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alternative data, as the term suggests, is &lt;strong&gt;non-traditional&lt;/strong&gt; that can provide information on how well a company or asset can perform in the future, such as company filling, broker forecast, and management guidance. This data can be used for pre-trade investment analysis, as well as helping investors monitor the health of a company, industry, or economy.&lt;/p&gt;

&lt;p&gt;Many investments already see that alternative data is just as fundamental data for their financial analysis and insights.&lt;/p&gt;

&lt;p&gt;Time is money and when trading financial instruments, a fraction of a second is all that stands between profit and catastrophe.&lt;/p&gt;

&lt;p&gt;Now you might be curious about how these data help in investment, financial analysis, growing companies, etc. So let’s see how this work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How alternative data is used?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In order to use alternative data companies uses Artificial Intelligence. Through machine learning, AI uses alternative data to predict various outcomes and patterns that can help investors and companies enormously.&lt;/p&gt;

&lt;p&gt;Today investors are using alternative forms of data for new and innovative ways to turn a profit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where can we use alternative data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By now, it must be clear but still let me just list different sector of people who uses it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Predictive modeling: A big part of being an analyst is to make educated guesses about how a stock’s price or a company’s financial standing will change. Alternative data help them factor in many different variables that could affect this change, such as the supply of goods/materials, consumer demand, and economic trends.&lt;/li&gt;
&lt;li&gt;Demand forecasting: Analysts use alternative data to anticipate future increases or decreases in consumer demand for certain products or services.&lt;/li&gt;
&lt;li&gt;Investment research and deal sourcing: Analysts from hedge funds, private equity firms, etc, are the ones who manage all the initial investment research which is critical for finding a profitable deal that avoids unnecessary risk. So the more details they have about an investment, and the more accurate those details are, the better their reporting and recommendations will be, and to help with that alternative data comes into the picture.&lt;/li&gt;
&lt;li&gt;Competitive advantage: Now is the time for enterprises to get comfortable with alternative data. As digital technologies and automation reshape how information is managed and used, industries are changing much faster than traditional data analytics can keep up. Alternative data along with artificial intelligence helps to curb this issue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Different types of Alternative Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are many types of alternative data sets. Different platforms are collecting data without you even noticing it, this collection of data helps them to grow faster. Let’s look at different types of alternative data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geo-location: Geo-location data which can be used to measure consumer foot traffic, Offers the ability to survey consumer panelists.&lt;/li&gt;
&lt;li&gt;Social media data: Social media is the treasure house of a lot of interesting alternative data. You can mine social media sites and derive new insights regarding products, brands, and much more. Sentiment analysis based on social media data is no longer a novel idea.&lt;/li&gt;
&lt;li&gt;The Internet: What you see on the website of a particular company is not all that is there on the Internet. There’s much more when it comes to web data that you can explore and exploit.&lt;/li&gt;
&lt;li&gt;Email receipts data: The world has yet to find a better way to communicate electronically than emails. Studying the email receipts of giant corporations like Amazon and Uber, you can derive a lot of insights regarding sales, marketing, and other business aspects.&lt;/li&gt;
&lt;li&gt;Credit card, and debit card data: People have switched over to credit and debit cards for shopping for a long while now. However, there’s a lot of data that is generated every day regarding purchase behavior and trends that you can make use of.&lt;/li&gt;
&lt;li&gt;Satellite data: There’s a growing trend to collect data from satellites or even low-level drones. The data collected in this way would be costly and its quality may vary. While you may get access to a lot of raw data, it may not be exactly useful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Using Proxycurl as an alternative data provider&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Proxycurl is a strong data company with a demonstrable capacity for handling unstructured data. Its core strength in data enrichment capabilities of people and companies - offering insights into people profiles, companies profiles, work &amp;amp; personal email addresses and contact, jobs info, and more sets it apart.&lt;/p&gt;

&lt;p&gt;Proxycurl offers APIs that are easy to use, it can drive and power the data-driven applications of hedge funds and investment companies, on top of that they are credit-based for as low as $0.01 per profile enrichment and thus does not tie users up with bulky, heavy subscription or contacts like many other. So Proxycurl is the way to go.&lt;/p&gt;

&lt;p&gt;Check out &lt;strong&gt;&lt;a href="https://nubela.co/blog/the-ultimate-guide-to-alternative-data-what-is-it-really/"&gt;Proxycurl&lt;/a&gt; (&lt;/strong&gt; &lt;a href="https://nubela.co/blog/the-ultimate-guide-to-alternative-data-what-is-it-really/"&gt;https://nubela.co/blog/the-ultimate-guide-to-alternative-data-what-is-it-really&lt;/a&gt; ) for more information.&lt;/p&gt;

&lt;p&gt;Know more about other products of Proxycurl&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jaimeinoque20.medium.com/no-datas-no-marketing-c42bb2ac986a"&gt;https://jaimeinoque20.medium.com/no-datas-no-marketing-c42bb2ac986a&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/AbhijeetBGavali/status/1580486639230414848"&gt;https://twitter.com/AbhijeetBGavali/status/1580486639230414848&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datascience</category>
      <category>api</category>
      <category>proxycurl</category>
      <category>finance</category>
    </item>
    <item>
      <title>Git Commands ( to ease your development 🤗 )</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Thu, 23 Jun 2022 06:52:36 +0000</pubDate>
      <link>https://forem.com/shivam164/git-commands-to-ease-your-development--5a2h</link>
      <guid>https://forem.com/shivam164/git-commands-to-ease-your-development--5a2h</guid>
      <description>&lt;p&gt;Git is a prevalent version control system ( VCS ) used by most programmers. In this blog, I am going to share some tips with basic commands to make using git easier.&lt;/p&gt;

&lt;p&gt;To start with git, we need to understand how things work locally on the system while using git.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9inpro89etzecq4zuqe6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9inpro89etzecq4zuqe6.png" alt="Workflow in Git"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This diagram will help to understand, what actually happens while using git locally. Starting with the working area, the working area is where the files that are not handled by git, it is the place where all the untracked files are kept. Staging area has files that are going to be part of the next commit. The repository contains all the project commits. Using the repository we can have files as it was at some point in time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Commands:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Initializing git in your directory
&lt;/h3&gt;

&lt;p&gt;The very first step that you need to do is to initialize the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. git config
&lt;/h3&gt;

&lt;p&gt;This command helps you to set the username and user email address to be used with your commits respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;global&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="s"&gt;"Shivam164"&lt;/span&gt;
&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;global&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="s"&gt;"sp...oo6@gmail.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. git status
&lt;/h3&gt;

&lt;p&gt;This command is used to see the state of the working area and staging area.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt; &lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. git add
&lt;/h3&gt;

&lt;p&gt;This command is used to add files to the staging area.&lt;/p&gt;

&lt;p&gt;To take all the files that are untracked in the working area to the staging area, we use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here ‘.’ specifies to stage all the untracked files.&lt;/p&gt;

&lt;p&gt;To specify files that should be tracked, we can use their file name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="n"&gt;abc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to stage abc.txt only.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. git commit
&lt;/h3&gt;

&lt;p&gt;The git commit command captures a snapshot of the project’s staged changes. Generally, we keep a short message with each commit in order to understand that commit in the future as well as for other people to understand. &lt;/p&gt;

&lt;p&gt;⇒ It is good to keep commits in the present tense and short ( about 50 characters ).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;commit&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="s"&gt;"first commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here ‘-m’ is for the message.&lt;br&gt;
To stage all your changes and commit them in single command we can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;commit&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;am&lt;/span&gt; &lt;span class="s"&gt;"committing all changes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There can be cases when you cannot explain your work in few words, even in such a scenario we should not just write a very big message in a single line, because that will be tough to read such messages on GitHub. For such a scenario after staging some file, we don't just directly commit like above. We write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;commit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we write git commit without -m. You will see a console text editor known as Vim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1q1x4zxyxm3d59upols.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1q1x4zxyxm3d59upols.png" alt="Vim"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can start writing your commit message here, you just need to press I (INSERT). And even within the long message, you should keep a short line at the start to before the long message, then after a line space, you can write your long message. When you are done writing your message, you can close this vim by first pressing ‘ESC’ and then ‘:wq’ to save and quit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fus4rbdyywprxc8ooheu3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fus4rbdyywprxc8ooheu3.png" alt="Git long commit messages"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of other useful git commit command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;commit&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;amend&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="s"&gt;"commit message'&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will merge this commit with the last commit and it will have a new commit message.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. git log
&lt;/h3&gt;

&lt;p&gt;The git log command displays all of the commits in a repository’s history.&lt;/p&gt;

&lt;p&gt;There are many ways to see commit history : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Most basic one: Shows all the commits from end to start, with all the info related to commits.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;It shows commits based on the HEAD.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To see some number of the last commits:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;To see the last 5 commits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To see commit from some commit to some other commit: We use the hash value of those commits.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="n"&gt;af156ff&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;.32509&lt;/span&gt;&lt;span class="n"&gt;d0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To see the stat of the commits:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;stat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This command gives the basic info along with the summary of number of changes made between each commit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;One of the handiest git log commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;oneline&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;decorate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;⇒ all: to see all the commits&lt;/p&gt;

&lt;p&gt;⇒ oneline: to keep all the data of commits within one line.&lt;/p&gt;

&lt;p&gt;⇒ graph: to keep commits in graphical form, very useful when working with branches.&lt;/p&gt;

&lt;p&gt;⇒ decorate: to make it visually better.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. git show
&lt;/h3&gt;

&lt;p&gt;The git show command will help to see details of a particular commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;c16945&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foi4wkxykd4qdibuszquo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foi4wkxykd4qdibuszquo.png" alt="git show"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. git diff
&lt;/h3&gt;

&lt;p&gt;The git diff command is to see the difference between different commits.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;diff&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;c16945&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;.9&lt;/span&gt;&lt;span class="n"&gt;dcff6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see the difference between commit with hash value 1c16945 and 9dcff6.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp70gcbia0uw3j7h0x8jf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp70gcbia0uw3j7h0x8jf.png" alt="git diff"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also use it directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;diff&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display the difference in files of the working area and directory.&lt;/p&gt;

&lt;p&gt;We can use - - staged with git diff&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;diff&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;staged&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display the difference in files of the working area and staging area.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. git stash
&lt;/h3&gt;

&lt;p&gt;The git stash temporarily shelves (or stashes) changes you’ve made to your working copy so you can work on something else, and then come back and re-apply them later on.&lt;/p&gt;

&lt;p&gt;Only the files that are in the staging area can be stashed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;
&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After using git stash, if we use the command git status we will not see any file in the staging area.&lt;/p&gt;

&lt;p&gt;We can also give a message while using git stash so that if we need it later we will be able to recall what we had done with the stashed files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;save&lt;/span&gt; &lt;span class="s"&gt;"changed title"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d7guk0s434gc59ijpau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d7guk0s434gc59ijpau.png" alt="git stash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To view all the stashed changes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To view some particular stash,&lt;/strong&gt; let’s say with index 1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To retrieves stash changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To retrieve last stashed change.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;pop&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To retrieve stash change with particular index
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;pop&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To delete stashed changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To delete all
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;clear&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To deleted some specific ones
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt; &lt;span class="n"&gt;drop&lt;/span&gt; &lt;span class="n"&gt;stash&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9. git branch
&lt;/h3&gt;

&lt;p&gt;The git branch command is used to work with branches in git. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating new branch:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;From the branch where HEAD is currently pointing to:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="n"&gt;newBranch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From a branch where HEAD is not currently pointing to:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="n"&gt;newBranch&lt;/span&gt; &lt;span class="n"&gt;fromBranch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Creating a new branch and switching to it:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;checkout&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="n"&gt;newBranch&lt;/span&gt; &lt;span class="n"&gt;fromBranch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Switching to different branch:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;checkout&lt;/span&gt; &lt;span class="n"&gt;toSwitchBranchName&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Comparing different branches:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;diff&lt;/span&gt; &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;new_feature&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Renaming branches:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To change the name of the branch, HEAD is currently pointing to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="n"&gt;newBranchName&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change the name of the branch irrespective of HEAD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="n"&gt;oldName&lt;/span&gt; &lt;span class="n"&gt;newName&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Deleting branches&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="n"&gt;branch_to_delete&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If we are currently on the branch that we are trying to delete, we will get error.&lt;/p&gt;

&lt;p&gt;So we have to make sure that &lt;strong&gt;we are not on branch we want to delete.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the branch we want to delete is unmerged and has commits than this command won’t work. Git does this to stop accidental deletion of branches.&lt;/p&gt;

&lt;p&gt;So we need to use ‘-D’ instead of ‘-d’&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  10. git merge
&lt;/h3&gt;

&lt;p&gt;The git merge command lets you take the independent lines of development created by git branch and integrate them into a single branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;merge&lt;/span&gt; &lt;span class="n"&gt;feature&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Nav&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above written command will merge feature/Nav branch with current checked out branch.&lt;/p&gt;

&lt;p&gt;Some of the good practices while merging branches, you can checkout &lt;a href="https://www.red-gate.com/simple-talk/opinion/opinion-pieces/branching-and-merging-ten-pretty-good-practices/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Currently it has commands only related to handling files locally. I will be updating it soon.  👊&lt;/p&gt;

</description>
      <category>git</category>
      <category>productivity</category>
      <category>community</category>
      <category>github</category>
    </item>
    <item>
      <title>Git VS GitHub</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Tue, 14 Jun 2022 07:20:15 +0000</pubDate>
      <link>https://forem.com/shivam164/git-vs-github-2ghj</link>
      <guid>https://forem.com/shivam164/git-vs-github-2ghj</guid>
      <description>&lt;p&gt;Git vs GitHub is one of the things that beginners find tough to understand. So in order to understand their differences let's first look at them individually.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is Git?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is a version control system for tracking changes in computer files. It is used to coordinate work among several people on a project and track progress over time. It is used for Source Code Management in software development.&lt;/p&gt;

&lt;p&gt;A version control system is a system that records all the changes made to a file or set of files, so a specific version may be called later if needed. This helps in collaboration with all team members.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages of using git:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git favors both programmer and non-technical users by keeping track of their project files.&lt;/li&gt;
&lt;li&gt;It allows multiple users to work together.&lt;/li&gt;
&lt;li&gt;Large projects can be handled effectively.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is GitHub?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub is a Git repository hosting service, which provides a web-based graphical interface.&lt;/p&gt;

&lt;p&gt;GitHub helps every team member to work together on the project from anywhere and makes it easy for them to collaborate.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;GIT VS GITHUB&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fja45sczfs1yfn8ero3yz.png" alt="Image description"&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Git&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Installed locally on the system.&lt;/td&gt;
&lt;td&gt;Hosted on the cloud.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git can be used offline and does not need an internet connection for use.&lt;/td&gt;
&lt;td&gt;GitHub cannot be used offline and needs an internet connection.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git can be used without GitHub.&lt;/td&gt;
&lt;td&gt;GitHub cannot be used without Git.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Used for version control system and works as source code management in software development.&lt;/td&gt;
&lt;td&gt;Used for centralized source code hosting.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git has no GUI.&lt;/td&gt;
&lt;td&gt;GitHub has GUI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code changes like commit, merge, etc. are done using commands from the command line.&lt;/td&gt;
&lt;td&gt;Everything is done through a web-based interface.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open source licensed.&lt;/td&gt;
&lt;td&gt;Includes free and pay-for-use tiers.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




</description>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Bit Manipulation</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Sat, 26 Feb 2022 17:52:29 +0000</pubDate>
      <link>https://forem.com/shivam164/bit-manipulation-kdl</link>
      <guid>https://forem.com/shivam164/bit-manipulation-kdl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Bit Manipulation&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Bit manipulation is the process of applying logical operations on a sequence of bits to achieve a required result. Like in decimal format, we do addition, subtraction, multiplication and division. Similarly, we can apply some operation to manipulate bits of numbers.&lt;/p&gt;

&lt;p&gt;In Binary notation, we use 1’s and 0’s to represent numbers.&lt;/p&gt;

&lt;p&gt;For ex :  5  =&amp;gt; 101&lt;br&gt;
    14 =&amp;gt; 1110&lt;/p&gt;

&lt;p&gt;One way of saying that some bit at some position is 1 or 0, we say bit is set or on when it is 1 and not set or off when it is 0.&lt;/p&gt;

&lt;p&gt;Those operators are known as bitwise operators.&lt;br&gt;
There are six types of bitwise operators.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;amp; ( AND )
| ( OR )
^ ( XOR )
&amp;lt;&amp;lt; ( LEFT SHIFT )
&amp;gt;&amp;gt; ( RIGHT SHIFT )
~ ( NOT )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will be covering the first five of these in this blog, these are the ones that are mostly used.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;AND &amp;amp;&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Bitwise AND &amp;amp;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bit a   |  bit b  | a &amp;amp; b (a AND b)
0           0          0
0           1          0
1           0          0
1           1          1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can use &amp;amp; operation to calculate the number of set bits in some number.&lt;/p&gt;

&lt;p&gt;To understand that, we first need to go through an observation.&lt;/p&gt;

&lt;p&gt;Let’s take a number.&lt;br&gt;
For ex :  42 (110100), if we subtract 1 from 42 it will become 41 that is 110011&lt;/p&gt;

&lt;p&gt;One thing that we can notice in this is that all the bits that are after the first set bit (from right) in 42 turned to 1 and that itself turned to 0.&lt;/p&gt;

&lt;p&gt;Similarly, in all numbers once we decrement it by 1 all the bits that are after the first set bit (from left) will turn into 1 and that itself will turn into 0.&lt;/p&gt;

&lt;p&gt;For ex :  10 =&amp;gt; 1010    9 =&amp;gt; 1001&lt;br&gt;
14 =&amp;gt; 1110     13 =&amp;gt; 1101&lt;/p&gt;

&lt;p&gt;To calculate number of bits in log(n) time :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int count = 0;
while(n&amp;gt;0){
    count++;
    n = n&amp;amp;(n-1);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above written code, every time n is going inside the loop it is losing one set bit and incrementing the count by 1. And that will be the total numbers of set bit in n.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;BITWISE OR ( | )&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bit a |  bit b |  a | b (a OR b)
0       0         0
0       1         1
1       0         1
1       1         1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bitwise OR is also a binary operator that operates on two equal-length bit patterns, similar to bitwise AND. If both bits in the compared position of the bit patterns are 0, the bit in the resulting bit pattern is 0, otherwise 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;XOR ( ^ )&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bitwise XOR also takes two equal-length bit patterns. If both bits in the compared position of the bit patterns are 0 or 1, the bit in the resulting bit pattern is 0, otherwise 1.&lt;/p&gt;

&lt;p&gt;Some properties of xor : &lt;/p&gt;

&lt;p&gt;A ^ A = 0&lt;br&gt;
A ^ 0 = A&lt;br&gt;
A ^ ( B ^ C) = ( A ^ B ) ^ C&lt;br&gt;
A ^ B = B ^ A&lt;/p&gt;

&lt;p&gt;One of the important things is that, if we are taking xor of many numbers. We can say that the result will have 1 at some position if the count of numbers with 1 at that position is odd, otherwise it will be zero.&lt;/p&gt;

&lt;p&gt;Using the above observation. We can say that, if we calculate xor of first n natural numbers, then it will depend upon remainder that we get on n%4.&lt;/p&gt;

&lt;p&gt;If it is 0. &lt;br&gt;
    Then answer = n.&lt;br&gt;
If it is 1.&lt;br&gt;
    Then answer = 1.&lt;br&gt;
If it is 2.&lt;br&gt;
    Then answer = n + 1.&lt;br&gt;
If it is 3.&lt;br&gt;
    Then answer = 0. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Left Shift (&amp;lt;&amp;lt;)&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If we apply left shift to a  number with x units ( 5&amp;lt;&amp;lt;x) this means that we are shifting bits of number to the left by x units and all the empty positions on the right will be filled with 0.&lt;/p&gt;

&lt;p&gt;Mathematically, on applying left shift to a number by x units it gets multiplied by 2^x.&lt;/p&gt;

&lt;p&gt;For ex : 3&amp;lt;&amp;lt;1 = 2X3 = 6 ( 110 )              [ 3( 11 )]&lt;br&gt;
    3&amp;lt;&amp;lt;2 = 4X3 = 12 ( 1100)&lt;br&gt;&lt;br&gt;
    9&amp;lt;&amp;lt;3 = 8X9 = 72 (1001000)      [9( 1001 )]          &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Right Shift (&amp;gt;&amp;gt;)&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is just opposite of the left shift, on applying it to a number with x units it shifts bits to right by x units.&lt;/p&gt;

&lt;p&gt;Mathematically, on applying the right shift to a number by x units it gets divided by 2^x.&lt;/p&gt;

&lt;p&gt;For ex : 3&amp;gt;&amp;gt;1 = 3/2 = 1&lt;br&gt;
    3&amp;gt;&amp;gt;2 = ¾ = 0&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some nice way to use these bitwise operations :&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;First of all, we can use these to solve real life problems, but obviously it will depend upon how we can apply bitmask.&lt;/p&gt;

&lt;p&gt;Short tricks that we can use daily in our code are as follows : &lt;br&gt;
To calculate some power of 2, we can directly write it as 1&amp;lt;&amp;lt;x  which will be equal to 2^x.&lt;br&gt;
We can use &amp;amp; and &amp;lt;&amp;lt; together to check whether a bit at some position is on or off.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bool on(int n, int position){
    int PowerOf2 = 1&amp;lt;&amp;lt;position;
    return ((n&amp;amp;PowerOf2)==0)? false : true;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Suggestions are welcomed, to make this blog better.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>dsa</category>
      <category>bit</category>
    </item>
    <item>
      <title>Async and Await</title>
      <dc:creator>Shivam</dc:creator>
      <pubDate>Sat, 19 Feb 2022 05:04:41 +0000</pubDate>
      <link>https://forem.com/shivam164/async-and-await-d6m</link>
      <guid>https://forem.com/shivam164/async-and-await-d6m</guid>
      <description>&lt;p&gt;Being a web developer you must have seen async and await in codes. And there are times when you forgot how it actually works, this is what happened with me, therefore I am writing this blog to have a quick recap on async and await on times when I need to. And I think there are many people like me who goes through this issue.&lt;br&gt;
So, I got your back. This is beginner friendly as well. So just dive into it.&lt;/p&gt;

&lt;p&gt;To understand async and await, we first need to understand promises in javascript.&lt;/p&gt;

&lt;p&gt;Promise is just like a promise in real life.&lt;/p&gt;

&lt;p&gt;For example : I promise to score good in upcoming test.&lt;/p&gt;

&lt;p&gt;There can be two outcome of this promise, either promise will be resolved or it will be rejected. In the example, if I would score good in test, that means promise is resolved. But if I am not able to score good that means promise is rejected.&lt;/p&gt;

&lt;p&gt;Promise are good to use when you want to do something that is going to take time in background. For example if you want to fetch an image from server.&lt;/p&gt;

&lt;p&gt;Let’s see how we can create a promise using code in javascript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let willScoreGood1 = new Promise((resolve,reject) ⇒ {

let score = 90

if(score≥90){

resolve(”You completed your promise, congrats”);

}else{

reject(’Failed’);

}

})

willScoreGood1

.then((message) ⇒ {

console.log(message);

}.catch(err ⇒ {

console.log(err);

})

let willScoreGood2 = new Promise((resolve,reject) ⇒ {

let score = 70

if(score≥90){

resolve(”You completed your promise, congrats”);

}else{

reject(’Failed’);

}

})

willScoreGood2

.then((message) ⇒ {

console.log(message);

}.catch(err ⇒ {

console.log(err);

})

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code we have written two promise, first one willScoreGood1 and second one willScoreGood2 on calling first it will get resolved and corresponding to that we will receive a message in .then. On calling second promise we will get an error, which we will get in .catch.&lt;/p&gt;

&lt;p&gt;Atlast we can see that using promises we can get the result of some task or the error for that task.&lt;/p&gt;

&lt;h2&gt;
  
  
  So now we know how promise works. Therefore we can move on to async and await.
&lt;/h2&gt;

&lt;p&gt;Let’s start with async : &lt;/p&gt;

&lt;p&gt;We use async keyword in front of a function to make it asynchronous, i.e. to take it out of normal sync of code.&lt;/p&gt;

&lt;p&gt;For example :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// NORMAL FUNCTION
const greetings = () =&amp;gt;{
   console.log("welcome everyone");
} 

// ASYNC FUNCTION 

const greeting = async () =&amp;gt; {
   console.log("welcome everyone");
};

greetings();
greeting();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;When we write async in front of a function, then it will return values in form of promises.&lt;/p&gt;

&lt;p&gt;At most of the times we use async and await together. &lt;/p&gt;

&lt;p&gt;So let’s move to await keyword.&lt;/p&gt;

&lt;p&gt;The advantage of an async function only becomes apparent when you combine it with the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await"&gt;await&lt;/a&gt;&lt;br&gt;
 keyword. await only works inside async function &lt;/p&gt;

&lt;p&gt;await can be put in front of any async promise-based function to pause your code on that line until the promise fulfills, then return the resulting value.&lt;/p&gt;

&lt;p&gt;CODE :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getRandomArbitrary(min, max) {
    return Math.random() * (max - min) + min;
}

async function GreaterThan5(){
    let value = getRandomArbitrary(0,10);
    setTimeout(
        if(value &amp;lt;= 5){
        return 'small';
    else{
        throw new Error('Value is large');
    },3000);
}

const asyncAndAwaitTogether = async () =&amp;gt; {
    const result = await GreaterThan5();
    console.log(result);
}

asyncAndAwaitTogether()
    .then(result =&amp;gt; {
            console.log(result);
    }.catch(error =&amp;gt; console.log(error);)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code, we have a function in the beginning that will return a random value in the range between min and max. &lt;/p&gt;

&lt;p&gt;Then there is a async function GreaterThan5 and it will take some time to complete, when called, that’s why we have made it async.&lt;/p&gt;

&lt;p&gt;After that there is one more async function asyncAndAwaitTogether, in this function we can see how async and await works together.&lt;/p&gt;

&lt;p&gt;First thing we can notice in asyncAndAwaitTogether is that it is async, which means it will return a promise and inside the code we are calling GreaterThan5 function and before that we have written await, what await does here is that it stops the code till it gets any response, as soon as it get any result in form of resolve or reject. If the result is resolve then we will move to next line, but if we are getting reject in the result, then we will come out of function.&lt;/p&gt;

&lt;p&gt;In the end we are calling asyncAndAwaitTogether, as it will return a promise we are using .then and .catch to get any kind of result.&lt;/p&gt;

&lt;p&gt;Conclusion, on using async keyword before a function will make it asynchronous and it will return promises. We use await in async function to stop the code till the result is fetched.&lt;/p&gt;

&lt;p&gt;That is all you need to get started with async and await,&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
