<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jino pl</title>
    <description>The latest articles on DEV Community by Jino pl (@jino93).</description>
    <link>https://dev.to/jino93</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%2F319749%2Fba80361d-7d5e-4cc2-89ae-efbdb92a9554.jpg</url>
      <title>DEV Community: Jino pl</title>
      <link>https://dev.to/jino93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jino93"/>
    <language>en</language>
    <item>
      <title>Essential Linux commands Every Dev should know !!</title>
      <dc:creator>Jino pl</dc:creator>
      <pubDate>Tue, 19 Jan 2021 02:57:19 +0000</pubDate>
      <link>https://dev.to/jino93/essential-linux-commands-every-dev-should-know-5f9o</link>
      <guid>https://dev.to/jino93/essential-linux-commands-every-dev-should-know-5f9o</guid>
      <description>&lt;p&gt;There are tons of commands in every Linux distro.some of the basic commands every developer should know.&lt;/p&gt;

&lt;h5&gt;
  
  
  1. Check current path of the directory
&lt;/h5&gt;



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

&lt;/div&gt;



&lt;h5&gt;
  
  
  2. Change to a directory
&lt;/h5&gt;



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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;cd data&lt;/code&gt; , to enter/change to folder &lt;em&gt;data&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  3. List contents of a directory
&lt;/h5&gt;



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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;ls data&lt;/code&gt; , will list files of &lt;em&gt;data&lt;/em&gt; folder.&lt;br&gt;
&lt;code&gt;ls -a data&lt;/code&gt; , will also list hidden files in the &lt;em&gt;data&lt;/em&gt; folder&lt;br&gt;
&lt;code&gt;ls -l data&lt;/code&gt; , will list files/folders in &lt;em&gt;data&lt;/em&gt; folder with permission.&lt;br&gt;
combining above two commands &lt;code&gt;ls -la data&lt;/code&gt; will give you all files including hidden files with permission.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  4. create a directory
&lt;/h5&gt;



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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;mkdir data&lt;/code&gt; will create &lt;em&gt;data&lt;/em&gt; directory in current location.&lt;br&gt;
&lt;code&gt;mkdir -p data/video&lt;/code&gt; will create &lt;em&gt;data&lt;/em&gt; directory and a video folder inside.&lt;br&gt;
&lt;code&gt;mkdir -p data/{video,music}&lt;/code&gt; will create &lt;em&gt;data&lt;/em&gt; directory and  video,music folder inside.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  5. view content of a file
&lt;/h5&gt;



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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;cat hulk.txt&lt;/code&gt; , can view content of hulk.txt&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  6. edit a file
&lt;/h5&gt;

&lt;p&gt;There are several ways we can edit file in Linux , most of the Linux distro will have vim editor. so we are looking into vim today.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;type &lt;code&gt;i&lt;/code&gt; for insert mode , make changes to current file.&lt;br&gt;
press ESC button then type &lt;code&gt;:wq&lt;/code&gt; to save the file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  7. search
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grep "pattern" file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;grep "hulk" avangers.txt&lt;/code&gt; , will search for the &lt;br&gt;
avangers.txt for the pattern "hulk".&lt;br&gt;
&lt;code&gt;grep -i "hulk" avangers.txt marvel.txt&lt;/code&gt; for case-insensitive search in multiple files.&lt;br&gt;
&lt;code&gt;grep -nr "hulk" data&lt;/code&gt; if you want to search a pattern in folder &lt;em&gt;data&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  8. find the difference between two files
&lt;/h5&gt;

&lt;p&gt;diff command is used to find the difference between two files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;diff file1 file2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;here we can understand difference between file1 and file2.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  9. find files in the system
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find -name hulk.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;this command will find all the files named hulk.txt in the folder and sub-folder.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  10. Changing permission of a file.
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;4 - read permission&lt;/li&gt;
&lt;li&gt;2 - write permission&lt;/li&gt;
&lt;li&gt;1 - execute permission&lt;/li&gt;
&lt;li&gt;0 - no permission
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod 755 hulk.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This gives all permission to file hulk.txt.&lt;br&gt;
In 755&lt;br&gt;
 &lt;code&gt;7&lt;/code&gt; is user permission&lt;br&gt;
 &lt;code&gt;5&lt;/code&gt; is group permission&lt;br&gt;
 &lt;code&gt;5&lt;/code&gt; is others permission&lt;/p&gt;

&lt;p&gt;for example if you want change permission/restrict permission to only for you&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod 700 hulk.txt 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This is my first post , let me know how can i improve in upcoming posts&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>firstpost</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
