<?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: Francisco Arenas 🐻</title>
    <description>The latest articles on DEV Community by Francisco Arenas 🐻 (@pacoeldeveloper).</description>
    <link>https://dev.to/pacoeldeveloper</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%2F785436%2Fb3b683eb-c28a-4873-ad31-055554b3839b.jpeg</url>
      <title>DEV Community: Francisco Arenas 🐻</title>
      <link>https://dev.to/pacoeldeveloper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pacoeldeveloper"/>
    <language>en</language>
    <item>
      <title>⌨️ Get to know your terminal pt.1</title>
      <dc:creator>Francisco Arenas 🐻</dc:creator>
      <pubDate>Mon, 07 Feb 2022 22:51:35 +0000</pubDate>
      <link>https://dev.to/pacoeldeveloper/get-to-know-your-terminal-4o1m</link>
      <guid>https://dev.to/pacoeldeveloper/get-to-know-your-terminal-4o1m</guid>
      <description>&lt;p&gt;👋🏽 Hello everyone! As always, I hope you are having an excellent day/night and I expect you are ready to learn something new today. 😉 In the following days I will be posting a series of 2 entries in which I’ll try my best to explain everything you need to know about our all-day partner: the terminal 💻. &lt;/p&gt;

&lt;p&gt;In this particular entry I will show you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The basics (definition, basic commands) 🐣&lt;/li&gt;
&lt;li&gt;How does the file management system works? 👀&lt;/li&gt;
&lt;li&gt;The shell and its magic-like functionality 🦀&lt;/li&gt;
&lt;li&gt;Intro to file types and permissions 🗂&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without further ado, let’s begin!&lt;/p&gt;

&lt;h2&gt;
  
  
  〉The basics 🐣
&lt;/h2&gt;

&lt;p&gt;The terminal is more than the program we use to look as cool hackers in front of others. Formally, we can define it as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;A UI that allows us to interact directly with our operating system via input commands.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before we continue, I must emphasize the fact that this UI emulates a &lt;strong&gt;&lt;em&gt;shell&lt;/em&gt;&lt;/strong&gt; interface or, said with more common words, a command-line interface. But, what is a &lt;em&gt;command&lt;/em&gt;? Since its usability varies depending on the context, it can and has different definitions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 A command is: &lt;br&gt;
&lt;em&gt;- An executable compiled program&lt;/em&gt;&lt;br&gt;
&lt;em&gt;- A native shell utility&lt;/em&gt;&lt;br&gt;
&lt;em&gt;- A downloaded utility (eg. &lt;code&gt;tree&lt;/code&gt;)&lt;/em&gt;&lt;br&gt;
&lt;em&gt;- A custom alias.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thus, we can conclude that a command is, regardless of its origin, a particular action that will have an effect in our OS thanks to its introduction in the terminal 🤯. Now that we have defined some basic concepts, let’s see what we can do in practice.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Commands that should and must be learnt
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;make a directory&lt;/strong&gt;: &lt;code&gt;mkdir new_directory_name&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;print the working directory&lt;/strong&gt;: &lt;code&gt;pwd&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;list every directory in current working space&lt;/strong&gt;: &lt;code&gt;ls&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;change to another directory&lt;/strong&gt;: &lt;code&gt;cd directory_name&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;remove a directory&lt;/strong&gt;: &lt;code&gt;rm -r directory_name&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rm -r test
$ ls

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;create a new file&lt;/strong&gt;: &lt;code&gt;touch new_file&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;copy a file&lt;/strong&gt;: &lt;code&gt;cp file new_destination&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;move a file to a new location or rename a file&lt;/strong&gt;: &lt;code&gt;mv file new_destination&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# RENAMING 
$ mv test_file copy
$ ls
copy_test_file  copy
----------------------
# MOVING
$ mv copy ..
$ ls
copy_test_file 
$ cd ..
$ ls
copy 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;delete a file&lt;/strong&gt;: &lt;code&gt;rm file&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rm copy_test_file 
$ ls

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;see in an interactive manner a file&lt;/strong&gt;: &lt;code&gt;less file&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ less DEV.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D-vTI74G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rh3msp54krbaql4rkar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D-vTI74G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rh3msp54krbaql4rkar.png" alt="less command" width="664" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;concatenate files or see the content of a single file&lt;/strong&gt;: &lt;code&gt;cat file file2&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat copy
This is the content of a test file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;see the first 10 elements within a file&lt;/strong&gt;: &lt;code&gt;head file&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ head copy
This is the content of a test file
1
2
3
4
5
6
7
8
9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;see the last 10 elements within a file&lt;/strong&gt;: &lt;code&gt;tail file&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ tail copy
10
11
12
13
14
15
16
17
18
19
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;see the type of a command&lt;/strong&gt;: &lt;code&gt;type command&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ type ls
ls is an alias for ls -G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;consult how a command works via the manual&lt;/strong&gt;: &lt;code&gt;man command&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;print something in the terminal&lt;/strong&gt;: &lt;code&gt;echo text&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;p&gt;In addition to what we have seen, every shell or terminal emulator has something called &lt;strong&gt;wildcards&lt;/strong&gt;. A wildcard can be perceive as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;A special or reserved character that enables a more sophisticated search within our file management system by looking up for a particular pattern.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;ul&gt;
&lt;li&gt;The symbol &lt;code&gt;*&lt;/code&gt; returns all the files and/or directories that coincide with the preceded or proceded pattern:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# PRECEDED
$ ls D*
Desktop Documents Downloads
---------------------------
# PROCEDED
$ ls *.txt
text.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The symbol &lt;code&gt;?&lt;/code&gt; returns all the files and/or directories that fulfill the exact number of characters represented by the mentioned symbol:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls image?
image1
--------------------------
$ ls image???
image123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The symbol &lt;code&gt;[[:upper:]]*&lt;/code&gt; returns all the files and/or directories that begin with an upper letter:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -d [[:upper:]]*
Documents Downloads Music Pictures Desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;As before but with the expected twist. The symbol &lt;code&gt;[[:lower:]]*&lt;/code&gt; returns all the files and/or directories that begin with an lower-case letter:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -d [[:lower:]]*
test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the topic is extensive on its own. Thus, if you want to know more this &lt;a href="https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm"&gt;link&lt;/a&gt; may be useful 😉.&lt;/p&gt;

&lt;h2&gt;
  
  
  〉The file management system 👀
&lt;/h2&gt;

&lt;p&gt;Alright, now that you know a bunch of commands to type in your terminal, its time to go deeply in the rabbit hole of the command-line and explain why files and directories are more important than we once thought.  &lt;/p&gt;

&lt;p&gt;In a UNIX-like operating system (eg. Linux or MacOS) not only core functionalities of it live within a file management system, but the whole OS lives within a directory. This system -or &lt;em&gt;The Linux File Hierarchy Structure&lt;/em&gt; to formally named it- defines the hierarchy, content and the whole structure of our OS. This is the reason why our interactions within the terminal are limited to edit, view and navigate across our system’s files and folders. &lt;/p&gt;

&lt;p&gt;As everything in life, the hierarchy of our OS’s directory structure begins with a root 🌱: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The root directory &lt;code&gt;/&lt;/code&gt; is the folder in which every existent directory and file is and will be saved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To follow with the structure of the File System is kinda’ complicated since every operating system may have exclusive directories. However, here you have a list of some of which I consider &lt;em&gt;essential&lt;/em&gt; to be aware of. In addition, you can visit &lt;a href="https://www.geeksforgeeks.org/linux-file-hierarchy-structure/"&gt;geeks for geeks&lt;/a&gt; for more information regarding this topic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;/etc&lt;/code&gt; directory stores system’s configuration information as well as startup and shutdown scripts for individual programs. &lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/dev&lt;/code&gt; directory stores files of attached media such as a USB. &lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/usr&lt;/code&gt; directory stores applications and utilities that are shared among users.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/bin&lt;/code&gt; directory stores the needed executable binaries for basic commands (eg. &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;ping&lt;/code&gt; or &lt;code&gt;cp&lt;/code&gt;) to properly work.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/lib&lt;/code&gt; directory stores shared libraries.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/tmp&lt;/code&gt; directory stores temporary files.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;/home&lt;/code&gt; directory stores the information (like proprietary directories) of a unique user. In the terminal is represented with the &lt;code&gt;~&lt;/code&gt; symbol. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  〉The shell functionality 🦀
&lt;/h2&gt;

&lt;p&gt;Our shell unlocks great power if you know how to use it and how it works. Any command-line is able to interpret a command, display an output or an error message if we have done something wrong. This process is handled by a &lt;strong&gt;file descriptor&lt;/strong&gt;, which is nothing but a number that serves as a unique identifier for  three main standard events:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;input&lt;/strong&gt; 👉🏽 A.K.A &lt;em&gt;stdin&lt;/em&gt;, whose ID’s 0 and handles any entry from our keyboard or files. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;output&lt;/strong&gt; 👉🏽 A.K.A &lt;em&gt;stdout&lt;/em&gt;, whose ID’s 1 and prints the correct output of a command. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;error&lt;/strong&gt; 👉🏽 A.K.A &lt;em&gt;stderr&lt;/em&gt;, whose ID’s 2 and prints an error message whenever the command we introduced do not works. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This knowledge is useful not only to understand why our shell works the way it does, but because it allows us to use three powerful concepts:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔄 Redirections
&lt;/h3&gt;

&lt;p&gt;Useful for:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Taking the shell’s stdin (&lt;code&gt;&amp;lt;&lt;/code&gt;), stdout or stderr (&lt;code&gt;&amp;gt;&lt;/code&gt;) and save it into a file.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;h4&gt;
  
  
  Saving the stdout in a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls Pictures &amp;gt; images.txt
$ cat images.txt
image1.png
image0.png
image2.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Saving the stderr in a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls Picture &amp;gt; images.txt
$ cat images.txt
ls: Picture: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Saving the stdin in a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sort &amp;lt; images.txt
$ cat images.txt
image0.png
image1.png
image2.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Be aware that any time you use the individual symbols of &lt;code&gt;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;&lt;/code&gt; you will rewrite whatever is in your result file. To concatenate information use: &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; 🤓.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚬 Pipes
&lt;/h3&gt;

&lt;p&gt;Useful for:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Concatenating commands &lt;code&gt;|&lt;/code&gt;. Use the stdout as the stdin of another command.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h4&gt;
  
  
  Creating a file
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls Pictures | tee result.txt # tee creates a file within pipes
$ cat result.txt
image1.png
image0.png
image2.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🕹 Control operators
&lt;/h3&gt;

&lt;p&gt;Useful for:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;em&gt;Concatenating and/or executing various commands in an asynchronous, synchronous or conditional manner.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;h4&gt;
  
  
  Asynchronous (multithread execution using the &lt;code&gt;&amp;amp;&lt;/code&gt; operator)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls &amp;amp; mkdir test
[1] 1669.  # --&amp;gt; thread 1 
[2] 1670.  # --&amp;gt; thread 2
[2]  + 1670 done         mkdir test  # --&amp;gt; thread 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Synchronous (Ordered execution using the &lt;code&gt;;&lt;/code&gt; operator)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls ; mkdir test
Blog   # --&amp;gt; command 1
       # --&amp;gt; command 2
$ ls
Blog   test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Conditional (Logic-based execution using the &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; and &lt;code&gt;||&lt;/code&gt; operators)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# executed if both of the commands do not have a stderr (fd: 2)
$ mkdir test1 &amp;amp;&amp;amp; ls
Blog   test   test1
-------------------
# executed if one of the commands do not have a stderr (fd: 2)
$ cd test2 || ls
Blog   test   test1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These examples were simple. Thus, I will leave you with this &lt;a href="https://opensource.com/article/18/11/control-operators-bash-shell"&gt;link&lt;/a&gt; if you are interested in knowing more about it.  &lt;/p&gt;

&lt;h2&gt;
  
  
  〉File types and permissions 🗂
&lt;/h2&gt;

&lt;p&gt;To conclude with this blog entry, let’s introduce ourselves to permissions and file types and owners. A file in UNIX-like operating systems can be classified as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;normal&lt;/strong&gt; file (represented in the shell with &lt;code&gt;-&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;directory&lt;/strong&gt; (represented in the shell with &lt;code&gt;d&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;symbolic link&lt;/strong&gt; (represented in the shell with &lt;code&gt;l&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;special block&lt;/strong&gt; (represented in the shell with &lt;code&gt;b&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For now I will not explain in detail what does these types mean. Yet, be aware that these characteristics allow us to interact in specific ways with our files. However, despite its type, every file has the same permissions options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reading&lt;/strong&gt; (represented in the shell with &lt;code&gt;r&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing&lt;/strong&gt; (represented in the shell with &lt;code&gt;w&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executing&lt;/strong&gt; (represented in the shell with &lt;code&gt;x&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These modes affect or can be configured to three different actors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;owner&lt;/strong&gt; of the file 🤓&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;group&lt;/strong&gt; of users 👯‍♀️&lt;/li&gt;
&lt;li&gt;The rest of the &lt;strong&gt;world&lt;/strong&gt; (someone who is not part in one the previous actors) 🌎&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is important since each permission can be activated or deactivated (represented in the shell with &lt;code&gt;-&lt;/code&gt;) to a specific actor using the octal numeric system:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1t8bAH9D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oo4dc6yh0ki0btbr2zn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1t8bAH9D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9oo4dc6yh0ki0btbr2zn.png" alt="octal" width="392" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To change the permissions use the command &lt;code&gt;chmod octal_number file&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;$ ls -l
drwxr-xr-x   5 francisco  staff   160 Feb  1 19:28 Developer

$ chmod 777 Developer
$ ls -l
drwxrwxrwx   5 francisco  staff   160 Feb  1 19:28 Developer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;You did it to the end. Thank you so much ❤️! Remember that this guide is not complete yet. Nonetheless, I hope you found it useful 🤓. I would like to give special thanks to the &lt;a href="https://platzi.com"&gt;Platzi&lt;/a&gt; community. Specially to professor Enrique Devars, who taught me everything you saw and will see in these terminal-related posts 💚😉. &lt;/p&gt;

&lt;p&gt;Programen bonito 💻!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>terminal</category>
    </item>
    <item>
      <title>💻 Basic developer configs for your M1 Mac.</title>
      <dc:creator>Francisco Arenas 🐻</dc:creator>
      <pubDate>Thu, 27 Jan 2022 00:55:22 +0000</pubDate>
      <link>https://dev.to/pacoeldeveloper/basic-developer-configs-for-your-m1-mac-ol2</link>
      <guid>https://dev.to/pacoeldeveloper/basic-developer-configs-for-your-m1-mac-ol2</guid>
      <description>&lt;p&gt;👋🏽 Hello everyone! It’s been a week since my last post... time goes by quickly 😅 But enough of reflections. As you can see in the title, I would like to share with you my setup I created for developing within my M1 Mac 💻. &lt;/p&gt;

&lt;p&gt;It’s been no secret that many technologies did not work well enough or needed to run via emulation during the first months of the Apple Silicon. And, although the transition for developers to adapt their software to the ARM architecture is happening as fast as expected, even in 2022 it is tricky for new developers to adapt their workflow in these machines. Thus, I will present to you the steps and programs I installed within my Mac in order to fulfill a mobile/MERN web app developer; as well as a CS Student during its lasts semesters profile 🚀.&lt;/p&gt;

&lt;h2&gt;
  
  
  〉Terminal. The main reason developers love UNIX
&lt;/h2&gt;

&lt;p&gt;Starting with the basics, I was expecting to use the pre-installed Terminal app for all those hacker-like movements we, as developers, must do to eat. However, after reading reviews I decided to install &lt;a href="https://iterm2.com"&gt;iTerm2&lt;/a&gt; instead. It is fast and lightweight (as you might expect from a terminal app) but its main advantage over the Apple version is its capacity of customization. &lt;/p&gt;

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

&lt;p&gt;To have a similar setup like mine, use: &lt;a href="https://ohmyz.sh"&gt;ohMyZsh&lt;/a&gt; to make easier the customization process, alongside &lt;a href="https://github.com/romkatv/powerlevel10k"&gt;powerlever10k&lt;/a&gt; to theme things up. Furthermore, in order to have a clearer and more descriptive step-by-step guide for this tools, I encourage you to follow these two videos: &lt;a href="https://youtu.be/0MiGnwPdNGE"&gt;video 1&lt;/a&gt; and &lt;a href="https://youtu.be/KwYqtbSwnH8"&gt;video 2&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;In addition, I would like to mention that these computers have git installed. Thus, you could check you git version in your terminal using &lt;code&gt;git --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IZnNgz4r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1l0fsv97n43s4nu2t94p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IZnNgz4r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1l0fsv97n43s4nu2t94p.png" alt="Git I have installed" width="329" height="48"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  〉PM. Why should you have one in Mac?
&lt;/h2&gt;

&lt;p&gt;A packet manager (PM) is a must-have tool for developers since it makes things easier (software installation or even languages integration). The most popular one in macOS is &lt;a href="https://brew.sh"&gt;Homebrew&lt;/a&gt; and its installation process is as simple as following all the steps it describes once you copy the next line in your terminal: &lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  〉Apps. The most obvious yet the most needed feature
&lt;/h2&gt;

&lt;p&gt;I must say that this section took me a month to be finished in my Mac due to the lack of optimization with a few apps. But, as the time I’m writing this I can say that the following apps run perfectly and without Rosetta2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Xcode&lt;/strong&gt; (for Apple-only applications): A few note here. My installation took over 5 hours long (even though I was directly connected to my router). Thus, I recommend you to install this with time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android Studio&lt;/strong&gt; (for Android-only applications): Now that the Bumblebee release is available I can tell that Android studio, even its emulator, runs as expected. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Figma&lt;/strong&gt; (for app design): It is a sketch like tool and has a very complete free version. However, in its &lt;a href="https://www.figma.com/downloads/"&gt;web page&lt;/a&gt; you can apply for a free premium account if you are a student. So, use your student mail on this one 😉. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Studio Code&lt;/strong&gt;: The text editor of my choice. &lt;a href="https://code.visualstudio.com"&gt;Download&lt;/a&gt; it and be pleased with its capacities. However, be cautious since its web page presents you the universal verison of the app. Scroll down and download the Apple Silicon version. Furthermore, in the future I’m planning to show what extensions I use, so, be tuned:D&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  〉Web tools. I couldn’t think of a catchy subtitle
&lt;/h2&gt;

&lt;p&gt;Finally, one of the tools I use the most is Node JS. To install it we will use Homebrew and NVM (why nvm? ‘cause it makes version management easier and less messier), thus, is important to do so once you have installed that packet manager. In your terminal type &lt;code&gt;brew install nvm&lt;/code&gt;. The first time you type this command it will not let you use nvm since there is not a proper usable PATH within your mac. Fortunately, Alex Ziskind did a wonderful &lt;a href="https://youtu.be/AEuI0PBvgfM"&gt;video&lt;/a&gt; that tells us the right directions to follow in order to properly add NVM to our system. As a summary of his amazing job, we must do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the nvm directory using: &lt;code&gt;mkdir ~/.nvm&lt;/code&gt;. You can type this command wherever you are located within the terminal path. However I recommend you to do it in your home route 🏠&lt;/li&gt;
&lt;li&gt;Open your &lt;code&gt;/.zshrc&lt;/code&gt; file in any text editor (if you use VS Code type: &lt;code&gt;code .zshrc&lt;/code&gt;) and add the following lines of code:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local brew_path="/opt/homebrew/bin"
local brew_opt_path="/opt/homebrew/opt"
local nvm_path="$HOME/.nvm"

export PATH="${brew_path}:${PATH}"
export NVM_DIR="${nvm_path}"

[ -s "${brew_opt_path}/nvm/nvm.sh" ] &amp;amp;&amp;amp; . "${brew_opt_path}/nvm/nvm.sh" # This loads nvm
[ -s "${brew_opt_path}/nvm/etc/bash_completion.d/nvm" ] &amp;amp;&amp;amp; . "${brew_opt_path}/nvm/etc/bash_completion.d/nvm"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save the file and type: &lt;code&gt;nvm help&lt;/code&gt; to see if you did everything correctly. If you did, you will see a lot of information in your terminal. &lt;/li&gt;
&lt;li&gt;Finally, to install the latest version of node type &lt;code&gt;nvm install node&lt;/code&gt;. However, if you need another verision, you can type &lt;code&gt;nvm install numberOfVersion&lt;/code&gt; (eg. &lt;code&gt;nvm install 14&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;You did it to the end. Thank you so much ❤️! This guide was simple yet I hope you find it useful. I am concerned that I did not mentioned how to add important technologies (such as python 3.x) but expect those iterations to this guide soon 😉. &lt;/p&gt;

&lt;p&gt;Programen bonito 💻!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>productivity</category>
      <category>m1mac</category>
    </item>
    <item>
      <title>👋🏽 Hello there!</title>
      <dc:creator>Francisco Arenas 🐻</dc:creator>
      <pubDate>Tue, 18 Jan 2022 01:59:57 +0000</pubDate>
      <link>https://dev.to/pacoeldeveloper/hello-there-57p0</link>
      <guid>https://dev.to/pacoeldeveloper/hello-there-57p0</guid>
      <description>&lt;p&gt;🕯 You and I live in a world of over 7.8 billion people... that’s a lot of persons who share, in the same instance of time, our reality. This impactful statement opens a lot of existential questions. But, the one that inspired me to open this blog was: &lt;strong&gt;&lt;em&gt;Will someone remember or find useful the memories I am creating, and how?&lt;/em&gt;&lt;/strong&gt; Hello, everyone! 👋🏽 My name’s Paco. I’ve been an active user of this platform since the start of the pandemic (hey something good happened thanks to it 😅) and I wanted to begin this journey with those words to not only inspire myself, but you. &lt;/p&gt;

&lt;p&gt;Nowadays, thanks to technology, any common person as you and me has the power to have a voice and be listened by the entire globe. Yet, few are those who want or have enough courage to be heard in the hazardous infinity of the web. And it is understandable, opening ourselves by sharing our intimate longings to collective critiques is not a desirable affliction. &lt;/p&gt;

&lt;p&gt;Nonetheless, and as I mentioned before, there’s people who continuously portray their visions despite the frustrations that can be found along the way. Why? Because it is through the manifestation of ourselves within a community, regardless of the competition, what creates and inspires change to happen.  &lt;/p&gt;

&lt;p&gt;As this text comes to its end, I want to thank all those helpful and encouraging profiles within this marvelous community that have not only assisted me develop my different scholar assignments, but inspired me to share with others my passion towards technology. Furthermore, and with the purpose to mark a conclusion, in the following entries, I’ll do my best to aid you with my continuously expanding set of abilities, in addition to invite you to awake your creativity. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fear yourself, because none other than you will stop or limit the potential of the talent you have to improve the world.&lt;/em&gt;&lt;/p&gt;

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