<?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: shun</title>
    <description>The latest articles on DEV Community by shun (@shunmare).</description>
    <link>https://dev.to/shunmare</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%2F1132265%2F4134f49a-1285-461d-96a0-a8fe376fb557.jpeg</url>
      <title>DEV Community: shun</title>
      <link>https://dev.to/shunmare</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shunmare"/>
    <language>en</language>
    <item>
      <title>Configuring vm.max_map_count for Elasticsearch in Docker using WSL</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 11:05:28 +0000</pubDate>
      <link>https://dev.to/shunmare/configuring-vmmaxmapcount-for-elasticsearch-in-docker-using-wsl-3fhc</link>
      <guid>https://dev.to/shunmare/configuring-vmmaxmapcount-for-elasticsearch-in-docker-using-wsl-3fhc</guid>
      <description>&lt;h2&gt;
  
  
  Configuring vm.max_map_count for Elasticsearch in Docker using WSL
&lt;/h2&gt;

&lt;p&gt;When running Elasticsearch on Docker, you might encounter an error message like the following if the default value of vm.max_map_count is too low:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;max virtual memory areas vm.max_map_count &lt;span class="o"&gt;[&lt;/span&gt;65530] is too low, increase to at least &lt;span class="o"&gt;[&lt;/span&gt;262144]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To resolve this error, you need to use Windows Subsystem for Linux (WSL) to properly configure the value of vm.max_map_count.&lt;/p&gt;

&lt;p&gt;Accessing Docker Desktop's WSL Environment&lt;br&gt;
Open a command prompt and access the WSL environment of Docker Desktop using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;PS C:&lt;span class="se"&gt;\w&lt;/span&gt;ork&lt;span class="se"&gt;\p&lt;/span&gt;roject&lt;span class="se"&gt;\l&lt;/span&gt;ogstash&amp;gt; wsl &lt;span class="nt"&gt;-d&lt;/span&gt; docker-desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modifying System Settings&lt;br&gt;
Once inside the WSL environment, use the following command to change the value of vm.max_map_count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;DESKTOP-XXXXXXX:/path/to/directory# sysctl &lt;span class="nt"&gt;-w&lt;/span&gt; vm.max_map_count&lt;span class="o"&gt;=&lt;/span&gt;262144
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exiting the WSL Environment&lt;br&gt;
Exit the WSL environment using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;DESKTOP-XXXXXXX:/path/to/directory# &lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Following these steps should resolve the Elasticsearch error related to vm.max_map_count, allowing Elasticsearch to run smoothly.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>elasticsearch</category>
      <category>wsl</category>
    </item>
    <item>
      <title>Elasticsearch, Logstash, and Kibana Compatibility Matrix</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 10:42:07 +0000</pubDate>
      <link>https://dev.to/shunmare/elasticsearch-logstash-and-kibana-compatibility-matrix-2a7p</link>
      <guid>https://dev.to/shunmare/elasticsearch-logstash-and-kibana-compatibility-matrix-2a7p</guid>
      <description>&lt;h2&gt;
  
  
  Compatibility Matrix for Elasticsearch, Logstash, and Kibana
&lt;/h2&gt;

&lt;p&gt;Detailed compatibility information for Elasticsearch, Logstash, and Kibana can be found on Elastic's official support matrix page. The following matrix summarizes the compatibility of major versions, focusing on 7.x and 8.x.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compatibility Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;Compatible with Elasticsearch&lt;/th&gt;
&lt;th&gt;Compatible with Logstash&lt;/th&gt;
&lt;th&gt;Compatible with Kibana&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Elasticsearch&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logstash&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kibana&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;7.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elasticsearch&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logstash&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kibana&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;8.x&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Please note that this table provides a general overview of compatibility, and specifics about sub-versions and certain features/settings can be found in the official documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  More Information
&lt;/h3&gt;

&lt;p&gt;For detailed information about compatibility and compatibility with other versions/products, please refer to Elastic's official support matrix page.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/jp/support/matrix"&gt;Japanese Support Matrix Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/support/matrix"&gt;English Support Matrix Page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We hope this compatibility matrix assists you in making informed decisions about choosing appropriate versions and managing your systems. If you have further questions or require more detailed information, please consult the official support matrix page or let us know.&lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>logstash</category>
      <category>kibana</category>
    </item>
    <item>
      <title>Standard Linux Commands and Their Outputs</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:23 +0000</pubDate>
      <link>https://dev.to/shunmare/standard-linux-commands-and-their-outputs-1a1p</link>
      <guid>https://dev.to/shunmare/standard-linux-commands-and-their-outputs-1a1p</guid>
      <description>&lt;h2&gt;
  
  
  File Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt;: List directory contents
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
  &lt;/span&gt;file1.txt  file2.txt  dir1/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt;: Print working directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
  /home/user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Text Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt;: Display file content
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;file1.txt
  This is the content of file1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;head&lt;/code&gt;: Display the beginning of a file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;head &lt;/span&gt;file1.txt
  First line of the file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tail&lt;/code&gt;: Display the end of a file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;tail &lt;/span&gt;file1.txt
  Last line of the file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  System Information
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;uname -a&lt;/code&gt;: Display system information
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;uname&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
  Linux &lt;span class="nb"&gt;hostname &lt;/span&gt;5.4.0-42-generic &lt;span class="c"&gt;#46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;free&lt;/code&gt;: Display memory usage
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;free &lt;span class="nt"&gt;-h&lt;/span&gt;
            total        used        free      shared  buff/cache   available
  Mem:      7.7Gi       1.2Gi       5.8Gi       123Mi       717Mi       6.2Gi
  Swap:     2.0Gi          0B       2.0Gi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Networking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ping&lt;/code&gt;: Test network connection
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;ping &lt;span class="nt"&gt;-c&lt;/span&gt; 4 google.com
  PING google.com &lt;span class="o"&gt;(&lt;/span&gt;172.217.22.14&lt;span class="o"&gt;)&lt;/span&gt; 56&lt;span class="o"&gt;(&lt;/span&gt;84&lt;span class="o"&gt;)&lt;/span&gt; bytes of data.
  64 bytes from fra15s11-in-f14.1e100.net &lt;span class="o"&gt;(&lt;/span&gt;172.217.22.14&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;53 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;29.3 ms
  ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;h2&gt;
  
  
  Miscellaneous
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;echo&lt;/code&gt;: Display a line of text&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
$ echo "Hello, World!"&lt;br&gt;
Hello, World!&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;history&lt;/code&gt;: Display command history&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
$ history&lt;br&gt;
1  ls&lt;br&gt;
2  cd ..&lt;br&gt;
3  pwd&lt;br&gt;
...&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>File and Directory Operations in Linux Commands</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:21 +0000</pubDate>
      <link>https://dev.to/shunmare/file-and-directory-operations-in-linux-commands-3kf3</link>
      <guid>https://dev.to/shunmare/file-and-directory-operations-in-linux-commands-3kf3</guid>
      <description>&lt;h2&gt;
  
  
  Creating and Removing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;touch&lt;/code&gt;: Create an empty file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;newfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt;: Create a new directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;new_directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;rm&lt;/code&gt;: Remove files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-r (or --recursive)&lt;/code&gt;: Remove directories and their contents.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-f&lt;/code&gt;: Force removal without confirmation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;file_to_remove.txt
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; directory_to_remove/
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;rmdir&lt;/code&gt;: Remove an empty directory.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rmdir &lt;/span&gt;empty_directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Copying, Moving, and Renaming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;cp&lt;/code&gt;: Copy files or directories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt;: Recursively copy directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt;: Prompt before overwriting files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;source.txt destination.txt
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-ri&lt;/span&gt; source_directory/ destination_directory/
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;code&gt;mv&lt;/code&gt;: Move or rename files or directories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt;: Prompt before overwriting files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; oldname.txt newname.txt
&lt;/code&gt;&lt;/pre&gt;




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

&lt;h2&gt;
  
  
  Listing and Navigating
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ls&lt;/code&gt;: List directory contents.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-l&lt;/code&gt;: Display in long format.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-a&lt;/code&gt;: Show hidden files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-h&lt;/code&gt;: Display sizes in human-readable format.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;pwd&lt;/code&gt;: Print the current working directory.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt;: Change the current directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/directory/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File Content Viewing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt;: Display the entire content of a file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;file.txt
  This is the content of file.txt.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;less&lt;/code&gt;: View file content with pagination. No direct output, but provides an interactive view.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;less file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;head&lt;/code&gt;: Display the beginning of a file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;head &lt;/span&gt;file.txt
  First line of the file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tail&lt;/code&gt;: Display the end of a file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-f&lt;/code&gt;: Follow the content of a file in real-time.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/syslog
Aug 11 12:34:56 &lt;span class="nb"&gt;hostname &lt;/span&gt;program[1234]: Log message here.
&lt;/code&gt;&lt;/pre&gt;




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

&lt;h2&gt;
  
  
  File and Directory Information
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;stat&lt;/code&gt;: Display detailed information about a file or directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;file.txt
  File: file.txt
  Size: 1234       Blocks: 8          IO Block: 4096   regular file
  Device: 801h/2049d      Inode: 123456      Links: 1
  Access: &lt;span class="o"&gt;(&lt;/span&gt;0644/-rw-r--r--&lt;span class="o"&gt;)&lt;/span&gt;  Uid: &lt;span class="o"&gt;(&lt;/span&gt; 1000/    user&lt;span class="o"&gt;)&lt;/span&gt;   Gid: &lt;span class="o"&gt;(&lt;/span&gt; 1000/    user&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;file&lt;/code&gt;: Determine the type of a file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;file image.jpg
  image.jpg: JPEG image data, JFIF standard 1.01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Searching for Files
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;find&lt;/code&gt;: Search for files in a directory hierarchy.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;find /path/to/search/ &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"pattern*"&lt;/span&gt;
  /path/to/search/pattern1.txt
  /path/to/search/subdir/pattern2.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
    </item>
    <item>
      <title>Text Processing in Linux</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:20 +0000</pubDate>
      <link>https://dev.to/shunmare/text-processing-in-linux-16d7</link>
      <guid>https://dev.to/shunmare/text-processing-in-linux-16d7</guid>
      <description>&lt;h2&gt;
  
  
  Searching within Text
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;grep&lt;/code&gt;: Search for a pattern within files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt;: Ignore case.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt; or &lt;code&gt;-R&lt;/code&gt;: Recursively search in directories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-v&lt;/code&gt;: Invert the search (return lines that don't match).
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"search_term"&lt;/span&gt; file.txt
This line contains the search_term.
&lt;/code&gt;&lt;/pre&gt;




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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```bash
$ grep -i "Search_Term" file.txt
This line contains the search_term.
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Filtering and Transforming Text
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;awk&lt;/code&gt;: A versatile programming language for working on files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"a 1&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;b 2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;c 3"&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;
  1
  2
  3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sed&lt;/code&gt;: Stream editor for filtering and transforming text.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello World"&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="s1"&gt;'s/World/Universe/'&lt;/span&gt;
  Hello Universe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Sorting and Counting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;sort&lt;/code&gt;: Sort lines in text files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt;: Reverse the result of comparisons (descending).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-n&lt;/code&gt;: Compare according to string numerical value.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"banana&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;apple&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;cherry"&lt;/span&gt; | &lt;span class="nb"&gt;sort
&lt;/span&gt;apple
banana
cherry
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;code&gt;uniq&lt;/code&gt;: Report or omit repeated lines.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-c&lt;/code&gt;: Prefix lines by the number of occurrences.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"a&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;b&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;c"&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt;
  2 a
  3 b
  1 c
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;code&gt;wc&lt;/code&gt;: Count words, lines, and characters in files.&lt;br&gt;
    - &lt;code&gt;-l&lt;/code&gt;: Count lines.&lt;br&gt;
    - &lt;code&gt;-w&lt;/code&gt;: Count words.&lt;br&gt;
    - &lt;code&gt;-c&lt;/code&gt;: Count bytes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ```bash
  $ echo "Hello World" | wc -w
  2
  ```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Text Display
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt;: Concatenate and display the content of files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;file.txt
  This is the content of file.txt.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tac&lt;/code&gt;: Display files in reverse.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"line1&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line3"&lt;/span&gt; | &lt;span class="nb"&gt;tac
  &lt;/span&gt;line3
  line2
  line1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nl&lt;/code&gt;: Number lines of files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"line1&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line3"&lt;/span&gt; | &lt;span class="nb"&gt;nl
  &lt;/span&gt;1  line1
  2  line2
  3  line3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;head&lt;/code&gt;: Display the beginning of a file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-n&lt;/code&gt;: Specify the number of lines to show.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"line1&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line3"&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 2
  line1
  line2
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;code&gt;tail&lt;/code&gt;: Display the end of a file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-n&lt;/code&gt;: Specify the number of lines to show.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-f&lt;/code&gt;: Follow the content of a file in real-time.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"line1&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;line3"&lt;/span&gt; | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 2
  line2
  line3
&lt;/code&gt;&lt;/pre&gt;




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

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Permissions and Ownership in Linux</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:19 +0000</pubDate>
      <link>https://dev.to/shunmare/permissions-and-ownership-in-linux-3cpe</link>
      <guid>https://dev.to/shunmare/permissions-and-ownership-in-linux-3cpe</guid>
      <description>&lt;p&gt;In Linux, files and directories have three types of permissions (read, write, execute) for three types of users (owner, group, others).&lt;br&gt;
&lt;code&gt;r&lt;/code&gt; (read): Allows reading the file's contents.&lt;br&gt;
&lt;code&gt;w&lt;/code&gt; (write): Permits modifying the file's contents.&lt;br&gt;
&lt;code&gt;x&lt;/code&gt; (execute): Enables executing the file as a program.&lt;/p&gt;
&lt;h2&gt;
  
  
  Changing File Permissions with chmod
&lt;/h2&gt;

&lt;p&gt;You can use the chmod command to modify access permissions for files and directories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Symbolic Mode:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x file.txt  &lt;span class="c"&gt;# Add execute permission to the owner&lt;/span&gt;
  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;g-w file.txt  &lt;span class="c"&gt;# Remove write permission from the group&lt;/span&gt;
  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;&lt;span class="nv"&gt;o&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;r file.txt  &lt;span class="c"&gt;# Set read-only permission for others&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Octal Mode:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 file.txt  &lt;span class="c"&gt;# rwxr-xr-x: Owner has all permissions, group has read and execute, others have read and execute&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Changing File Owner and Group with chown
&lt;/h2&gt;

&lt;p&gt;The chown command lets you change the owner and group of files and directories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chown &lt;/span&gt;newowner file.txt          &lt;span class="c"&gt;# Change the file's owner&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chown &lt;/span&gt;newowner:newgroup file.txt &lt;span class="c"&gt;# Change both the owner and group of the file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Changing Group Ownership with chgrp
&lt;/h2&gt;

&lt;p&gt;Using the chgrp command, you can change the group ownership of files and directories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chgrp &lt;/span&gt;newgroup file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Viewing File Permissions with ls -l
&lt;/h2&gt;

&lt;p&gt;The ls -l command displays file and directory access permissions, owner, and group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;span class="nt"&gt;-rwxr-xr-x&lt;/span&gt; 1 owner group 1234 Jan 1 12:00 file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding and managing permissions and ownership is crucial for maintaining security and proper access control in a Linux system.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>System Operations in Linux</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:18 +0000</pubDate>
      <link>https://dev.to/shunmare/system-operations-in-linux-31dc</link>
      <guid>https://dev.to/shunmare/system-operations-in-linux-31dc</guid>
      <description>&lt;p&gt;Performing system operations is a crucial part of managing a Linux system. Here are some essential commands for handling &lt;/p&gt;

&lt;h2&gt;
  
  
  System Operations in Linux
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;ps&lt;/code&gt;: Display currently active processes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Show all processes for all users:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;ps aux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;top&lt;/code&gt;: Real-time Process Monitoring
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;top
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Some key commands while &lt;code&gt;top&lt;/code&gt; is running:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;q&lt;/code&gt;: Quit top&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;u&lt;/code&gt;: Show processes for a specific user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;k&lt;/code&gt;: Kill a specific process&lt;/li&gt;
&lt;/ul&gt;


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

&lt;h3&gt;
  
  
  &lt;code&gt;kill&lt;/code&gt;: Terminate Processes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage (using process ID):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;process_id]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Send a specific signal to a process (e.g., sending the SIGKILL signal):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;kill&lt;/span&gt; -[signal] &lt;span class="o"&gt;[&lt;/span&gt;process_id]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, to send the &lt;code&gt;SIGKILL&lt;/code&gt; signal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```bash
$ kill -9 [process_id]
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;shutdown&lt;/code&gt;: Shutdown or restart the system
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Shutdown immediately:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;shutdown &lt;span class="nt"&gt;-h&lt;/span&gt; now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Reboot immediately:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;shutdown &lt;span class="nt"&gt;-r&lt;/span&gt; now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shutdown with a message:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;$ &lt;/span&gt;shutdown &lt;span class="nt"&gt;-h&lt;/span&gt; +10 &lt;span class="s2"&gt;"System will shutdown in 10 minutes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will shut down the system in 10 minutes and broadcast the provided message to all logged-in users.&lt;/p&gt;

&lt;p&gt;Understanding these system operation commands is essential for effectively managing and maintaining a Linux system.&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Windows Command Prompt vs Linux Commands</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:16 +0000</pubDate>
      <link>https://dev.to/shunmare/windows-command-prompt-vs-linux-commands-1ee4</link>
      <guid>https://dev.to/shunmare/windows-command-prompt-vs-linux-commands-1ee4</guid>
      <description>&lt;h3&gt;
  
  
  File and Directory Operations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;dir&lt;/td&gt;
&lt;td&gt;List directory contents&lt;/td&gt;
&lt;td&gt;ls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cd&lt;/td&gt;
&lt;td&gt;Change directory&lt;/td&gt;
&lt;td&gt;cd&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mkdir&lt;/td&gt;
&lt;td&gt;Create a new directory&lt;/td&gt;
&lt;td&gt;mkdir&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;rmdir&lt;/td&gt;
&lt;td&gt;Remove a directory&lt;/td&gt;
&lt;td&gt;rmdir or rm -r&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;copy&lt;/td&gt;
&lt;td&gt;Copy files&lt;/td&gt;
&lt;td&gt;cp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;move&lt;/td&gt;
&lt;td&gt;Move or rename files&lt;/td&gt;
&lt;td&gt;mv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;del&lt;/td&gt;
&lt;td&gt;Delete a file&lt;/td&gt;
&lt;td&gt;rm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;type&lt;/td&gt;
&lt;td&gt;Display contents of a file&lt;/td&gt;
&lt;td&gt;cat&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Text Processing
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;find&lt;/td&gt;
&lt;td&gt;Search in a file&lt;/td&gt;
&lt;td&gt;grep&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sort&lt;/td&gt;
&lt;td&gt;Sort input&lt;/td&gt;
&lt;td&gt;sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;more&lt;/td&gt;
&lt;td&gt;Display output one screen&lt;/td&gt;
&lt;td&gt;more or less&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  System Operations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;tasklist&lt;/td&gt;
&lt;td&gt;List running processes&lt;/td&gt;
&lt;td&gt;ps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;taskkill&lt;/td&gt;
&lt;td&gt;Kill a process&lt;/td&gt;
&lt;td&gt;kill&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;shutdown&lt;/td&gt;
&lt;td&gt;Shutdown or restart system&lt;/td&gt;
&lt;td&gt;shutdown&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Networking
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ipconfig&lt;/td&gt;
&lt;td&gt;Display IP configuration&lt;/td&gt;
&lt;td&gt;ifconfig or ip a&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ping&lt;/td&gt;
&lt;td&gt;Send ICMP echo request&lt;/td&gt;
&lt;td&gt;ping&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;netstat&lt;/td&gt;
&lt;td&gt;Network statistics&lt;/td&gt;
&lt;td&gt;netstat&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Disk Operations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Linux Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;chkdsk&lt;/td&gt;
&lt;td&gt;Check disk for errors&lt;/td&gt;
&lt;td&gt;fsck&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;diskpart&lt;/td&gt;
&lt;td&gt;Disk partitioning&lt;/td&gt;
&lt;td&gt;fdisk or parted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;format&lt;/td&gt;
&lt;td&gt;Format a disk&lt;/td&gt;
&lt;td&gt;mkfs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>windows</category>
      <category>linux</category>
    </item>
    <item>
      <title>Standard Windows Commands and Their Outputs</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:15 +0000</pubDate>
      <link>https://dev.to/shunmare/standard-windows-commands-and-their-outputs-2mid</link>
      <guid>https://dev.to/shunmare/standard-windows-commands-and-their-outputs-2mid</guid>
      <description>&lt;h2&gt;
  
  
  File Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dir&lt;/code&gt;: List directory contents
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dir
  &lt;/span&gt;2023-08-11  10:00 AM    &amp;lt;DIR&amp;gt;          dir1
  2023-08-11  09:58 AM                20 file1.txt
  2023-08-11  09:59 AM                30 file2.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt;: Print working directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;cd
  &lt;/span&gt;C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\u&lt;/span&gt;ser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Text Operations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt;: Display file content
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;type &lt;/span&gt;file1.txt
  This is the content of file1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;more&lt;/code&gt;: Display the beginning of a file (Windows doesn't have an exact equivalent to head, but more can be used to view the contents)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; more file1.txt
  First line of the file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;more&lt;/code&gt;: Display the end of a file (Again, Windows doesn't have an exact tail equivalent, but you can scroll through with more)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; more file1.txt
  Last line of the file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  System Information
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;systeminfo&lt;/code&gt;: Display system information (This provides a lot of information, more than uname -a in Linux)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; systeminfo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;wmic OS get FreePhysicalMemory,TotalVisibleMemorySize /Value&lt;/code&gt;: Display memory usage (This is a bit more complex in Windows compared to Linux's &lt;code&gt;free&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; wmic OS get FreePhysicalMemory,TotalVisibleMemorySize /Value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Networking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ping&lt;/code&gt;: Test network connection
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; ping google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Miscellaneous
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo&lt;/code&gt;: Display a line of text
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;echo &lt;/span&gt;Hello, World!
  Hello, World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;doskey /history&lt;/code&gt;: Display command history (This might not capture all history like Linux's history command, but it's the closest built-in command)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; doskey /history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>windows</category>
    </item>
    <item>
      <title>File and Directory Operations in Windows Commands</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:15 +0000</pubDate>
      <link>https://dev.to/shunmare/file-and-directory-operations-in-windows-commands-g39</link>
      <guid>https://dev.to/shunmare/file-and-directory-operations-in-windows-commands-g39</guid>
      <description>&lt;h2&gt;
  
  
  Creating and Removing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo.&lt;/code&gt;: Create an empty file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; echo. &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; newfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mkdir: Create a new directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;mkdir &lt;/span&gt;new_directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;del&lt;/code&gt;: Remove files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; del file_to_remove.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rmdir&lt;/code&gt;: Remove a directory (either empty or with contents).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;rmdir&lt;/span&gt; /s /q directory_to_remove
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Copying, Moving, and Renaming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;copy&lt;/code&gt;: Copy files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; copy source.txt destination.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;xcopy&lt;/code&gt;: Copy directories.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; xcopy /s /i source_directory destination_directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;move&lt;/code&gt;: Move or rename files or directories.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; move oldname.txt newname.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Listing and Navigating
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dir&lt;/code&gt;: List directory contents.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dir&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;cd: Display or change the current directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="se"&gt;\p&lt;/span&gt;ath&lt;span class="se"&gt;\t&lt;/span&gt;o&lt;span class="se"&gt;\d&lt;/span&gt;irectory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File Content Viewing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt;: Display the entire content of a file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;type &lt;/span&gt;file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;more&lt;/code&gt;: View file content with pagination.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; more file.txt
  &lt;span class="o"&gt;(&lt;/span&gt;Note: Windows doesn&lt;span class="s1"&gt;'t have direct equivalents to `head` and `tail` commands in its basic command prompt.)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  File and Directory Information
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dir&lt;/code&gt;: Display detailed information about a file or directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dir &lt;/span&gt;file.txt
  &lt;span class="o"&gt;(&lt;/span&gt;Note: Windows doesn&lt;span class="s1"&gt;'t have a direct equivalent to the `file` command in its basic command prompt.)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Searching for Files
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dir&lt;/code&gt;: Search for files in a directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;dir&lt;/span&gt; /s /b &lt;span class="se"&gt;\p&lt;/span&gt;ath&lt;span class="se"&gt;\t&lt;/span&gt;o&lt;span class="se"&gt;\s&lt;/span&gt;earch&lt;span class="se"&gt;\*&lt;/span&gt;pattern&lt;span class="k"&gt;*&lt;/span&gt;.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>windows</category>
    </item>
    <item>
      <title>Text Processing in Windows</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:13 +0000</pubDate>
      <link>https://dev.to/shunmare/text-processing-in-windows-3mkl</link>
      <guid>https://dev.to/shunmare/text-processing-in-windows-3mkl</guid>
      <description>&lt;h2&gt;
  
  
  Searching within Text
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;findstr&lt;/code&gt;: Search for strings in files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/I&lt;/code&gt;: Ignore case.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/S&lt;/code&gt;: Searches for matching files in the current directory and all subdirectories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/V&lt;/code&gt;: Print only lines that do not contain a match.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; findstr &lt;span class="s2"&gt;"search_term"&lt;/span&gt; file.txt
This line contains the search_term.
&lt;/code&gt;&lt;/pre&gt;




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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```bash
C:\&amp;gt; findstr /I "Search_Term" file.txt
This line contains the search_term.
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Filtering and Transforming Text
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There's no direct equivalent to &lt;code&gt;awk&lt;/code&gt; in Windows, but you can use PowerShell or other scripting languages for similar tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;powershell -Command "(Get-Content file.txt) -replace 'World', 'Universe'"&lt;/code&gt;: Use PowerShell to replace text.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;echo &lt;/span&gt;Hello World | powershell &lt;span class="nt"&gt;-Command&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt;&lt;span class="s2"&gt; -replace 'World', 'Universe'"&lt;/span&gt;
  Hello Universe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Sorting and Counting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sort&lt;/code&gt;: Sort input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;echo &lt;/span&gt;banana &amp;amp; &lt;span class="nb"&gt;echo &lt;/span&gt;apple &amp;amp; &lt;span class="nb"&gt;echo &lt;/span&gt;cherry | &lt;span class="nb"&gt;sort
  &lt;/span&gt;apple
  banana
  cherry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;There's no direct &lt;code&gt;uniq&lt;/code&gt; equivalent in Windows, but you can use PowerShell for similar tasks.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;find /c /v ""&lt;/code&gt;: Count lines in a file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;echo &lt;/span&gt;Hello World | find /c /v &lt;span class="s2"&gt;""&lt;/span&gt;
  1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Text Display
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt;: Display the content of files.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;type &lt;/span&gt;file.txt
  This is the content of file.txt.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;There's no direct &lt;code&gt;tac&lt;/code&gt; equivalent in Windows, but you can use PowerShell for similar tasks.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;more +n&lt;/code&gt;: Display content starting from the nth line. (Similar to &lt;code&gt;tail&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;echo &lt;/span&gt;line1 &amp;amp; &lt;span class="nb"&gt;echo &lt;/span&gt;line2 &amp;amp; &lt;span class="nb"&gt;echo &lt;/span&gt;line3 | more +1
  line2
  line3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>windows</category>
    </item>
    <item>
      <title>System Operations in Windows</title>
      <dc:creator>shun</dc:creator>
      <pubDate>Sat, 12 Aug 2023 08:12:11 +0000</pubDate>
      <link>https://dev.to/shunmare/system-operations-in-windows-1lp3</link>
      <guid>https://dev.to/shunmare/system-operations-in-windows-1lp3</guid>
      <description>&lt;p&gt;Performing system operations is a crucial part of managing a Windows system. Here are some essential commands for handling system operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;tasklist&lt;/code&gt;: Display currently active processes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; tasklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;taskmgr&lt;/code&gt;: Real-time Process Monitoring
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; taskmgr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open the Task Manager GUI where you can monitor and manage processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;taskkill&lt;/code&gt;: Terminate Processes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic usage (using process ID):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; taskkill /PID &lt;span class="o"&gt;[&lt;/span&gt;process_id]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Terminate a process by its name:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; taskkill /IM &lt;span class="o"&gt;[&lt;/span&gt;process_name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, to kill a process named "notepad.exe":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```bash
C:\&amp;gt; taskkill /IM notepad.exe
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;shutdown&lt;/code&gt;: Shutdown or restart the system
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Shutdown immediately:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; shutdown /s /t 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Reboot immediately:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; shutdown /r /t 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shutdown with a message:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  C:&lt;span class="se"&gt;\&amp;gt;&lt;/span&gt; shutdown /s /t 600 /c &lt;span class="s2"&gt;"System will shutdown in 10 minutes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will shut down the system in 10 minutes and display the provided message.&lt;/p&gt;

&lt;p&gt;Understanding these system operation commands is essential for effectively managing and maintaining a Windows system.&lt;/p&gt;

</description>
      <category>windows</category>
    </item>
  </channel>
</rss>
