<?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: Dionysia Lemonaki</title>
    <description>The latest articles on DEV Community by Dionysia Lemonaki (@deniselemonaki).</description>
    <link>https://dev.to/deniselemonaki</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%2F411754%2F800b5463-a23e-4997-8098-2d8cfafdf462.jpg</url>
      <title>DEV Community: Dionysia Lemonaki</title>
      <link>https://dev.to/deniselemonaki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deniselemonaki"/>
    <language>en</language>
    <item>
      <title>Don't fear the command line :  Tar. What  is that?</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Tue, 16 Feb 2021 15:40:32 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-tar-what-is-that-d0e</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-tar-what-is-that-d0e</guid>
      <description>&lt;p&gt;When I first heard of the &lt;code&gt;tar&lt;/code&gt; command I was confused and could not quite understand it's use. How is that command useful in the day-to-day use of Linux and how often does it actually get used? Not to mention that it has all these flags to go alongside it, it was very confusing to me at first sight.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Tar?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;tar&lt;/code&gt; command stands for &lt;code&gt;tape archive&lt;/code&gt; and is used to group many files and directories into a single compressed archive. That way it can be moved from disc to disc, from machine to machine and sent over to someone else. The same command is also used to extract that archive that we create.&lt;br&gt;
It is essentially a zip file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/gh6gFVh35jyzNvHegl/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/gh6gFVh35jyzNvHegl/giphy.gif" alt="expand on that" width="500" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The general syntax looks something along these lines:&lt;br&gt;
&lt;code&gt;tar [flags] [archive-file] [file or directory to be archived]&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The absolute basics to get started
&lt;/h3&gt;

&lt;p&gt;To put a folder into an archive (let's say in this case a folder named &lt;code&gt;folder&lt;/code&gt;-very creative naming) we would do the following:&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="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-cvf&lt;/span&gt; archive.tar folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above we created a single file(&lt;code&gt;archive.tar&lt;/code&gt;) that contains the folder. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;-c&lt;/code&gt; flag stands for &lt;code&gt;create&lt;/code&gt; and is used to create the tar file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;v&lt;/code&gt; flag stands for &lt;code&gt;verbose&lt;/code&gt; and displays the progress of the action.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;f&lt;/code&gt; flag creates archive with given filename(&lt;code&gt;archive.tar&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While experimenting with the flags and changing their order I noticed that when I used &lt;code&gt;-cfv&lt;/code&gt; I got an error whereas when I used &lt;code&gt;-cvf&lt;/code&gt; like I showed in the example, it worked. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/fUqfaPVjiAQcfticZH/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/fUqfaPVjiAQcfticZH/giphy.gif" alt="how?" width="498" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I guessed that  the order must be very important.After some research with my best friend lately(stackoverflow)  I learnt that when the flags are used together , the dash in front of them is optional. However, if we use the dash we must use the flags in the accurate order otherwise it won't work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/XGnH2RGHoCqumsAXpo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/XGnH2RGHoCqumsAXpo/giphy.gif" alt="pat" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, we created our archive and now we want to extract it. &lt;br&gt;
To extract our &lt;code&gt;archive.tar&lt;/code&gt; file we switch the &lt;code&gt;-c&lt;/code&gt; flag which is used to &lt;code&gt;create&lt;/code&gt; and we instead use the &lt;code&gt;-x&lt;/code&gt; flag which stands for &lt;code&gt;extract&lt;/code&gt;.&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="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xvf&lt;/span&gt; archive.tar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The archive we created earlier was not compressed, and most times we want to compress it as it it significantly smaller in size as it gets run through gzip .&lt;br&gt;
To create an archive that is compressed we use the &lt;code&gt;-z&lt;/code&gt; flag which stands for &lt;code&gt;compress the tar file using gzip&lt;/code&gt;&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="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-czvf&lt;/span&gt; archive.tar.gz folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again,If using the &lt;code&gt;-&lt;/code&gt; in front of the flags it's important to remember the right order.&lt;br&gt;
If we type &lt;code&gt;ls -ls&lt;/code&gt; to see a &lt;code&gt;list&lt;/code&gt; with of the files we have and information about, including their size( that's what the &lt;code&gt;s&lt;/code&gt; stands for) then we'll notice than &lt;code&gt;archive.tar.gz&lt;/code&gt; is significantly smaller in size than &lt;code&gt;archive.tar&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To extract it we then use:&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="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; archive.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could use the &lt;code&gt;-C&lt;/code&gt; flag and a destination folder for where we want the files to go. That folder must exist already before this action.If we leave that flag of it'll extract the archive where ever we are .&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="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; archive.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; destination-folder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the absolute basics to get started with &lt;code&gt;tar&lt;/code&gt;&lt;br&gt;
Thanks for reading 😃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/wpoLqr5FT1sY0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/wpoLqr5FT1sY0/giphy.gif" alt="dog coding" width="480" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>linux</category>
      <category>bash</category>
    </item>
    <item>
      <title>CS50 Journal : Week 1</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Sun, 29 Nov 2020 09:32:43 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/cs50-journal-week-1-3ih0</link>
      <guid>https://dev.to/deniselemonaki/cs50-journal-week-1-3ih0</guid>
      <description>&lt;h1&gt;
  
  
  Starting to learn C
&lt;/h1&gt;

&lt;p&gt;This week went from the graphical language of Scratch to C. It was quite an abrupt change if you ask me.&lt;/p&gt;

&lt;p&gt;The transition from the introduction of programming ideas and a higher level overview of problem solving, to coding quite(that is is an understatement but anyway..) complex algorithms in the problem sets of this week, was not so smooth for me.&lt;/p&gt;

&lt;p&gt;The lecture did compare the ideas presented to us from the blocks in Scratch to the programming features of C, however if your are very new to programming, algorithmic thinking and solving problems in that way, it can be quite overwhelming. But that is the beauty of this course. It challenges you and pushes you to think and explore.&lt;/p&gt;

&lt;p&gt;A quote mentioned in the beginning of the lecture I think describes this week(and I'm sure it will apply to the rest of the course) perfectly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Trying to absorb all these new concepts may feel like drinking from a fire hose&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes. Exactly! There is a lot to soak in, a lot of information that hits your face suddenly.New syntax, new ways of doing things, new ways of thinking.&lt;/p&gt;

&lt;p&gt;Something else I wanted to mention for anyone in a similar position to me ,is that this takes time.&lt;/p&gt;

&lt;p&gt;Watching, and re-watching the lectures to understand what is going on, watching the shorts,reading the notes, attempting all the problem sets  and lab , taking other courses  and trying to have a life at the same time is a lot. So don't feel bad if this is taking ages. I know it's taking a while with me but that is ok.&lt;/p&gt;

&lt;p&gt;My main take away of this week was three key points that will serve as a guiding light when writing code :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Correctness of code&lt;/strong&gt;
&lt;em&gt;Does the program work as intended?&lt;/em&gt;
&lt;em&gt;Does it do what we want it to do?&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design&lt;/strong&gt;
&lt;em&gt;Does code repeat unnecessarily?&lt;/em&gt;
&lt;em&gt;Is it logically readable?&lt;/em&gt;
&lt;em&gt;Is it well written?&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Style&lt;/strong&gt;
&lt;em&gt;Is the formatting aesthetic?&lt;/em&gt;
&lt;em&gt;Is indentation consistent?&lt;/em&gt;
&lt;em&gt;Is there enough white space?&lt;/em&gt;
&lt;em&gt;Is it visually readable?&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  C As A Language
&lt;/h2&gt;

&lt;p&gt;It's a traditional,old ,text-based language.&lt;br&gt;
One thing I (&lt;em&gt;inserts drama&lt;/em&gt;) painfully learned, was that programs do exactly what we tell them to do. Unlike us humans, computers don't assume anything.&lt;/p&gt;

&lt;p&gt;When writing a program and trying to solve a problem ,we have to express the solution in a precise way, clearly and giving detailed instructions to implement that solution. This is know as an &lt;em&gt;algorithm&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;C is the standard language of choice when learning computer science and it does give an understanding as to what is actually happening under the hood.&lt;/p&gt;

&lt;p&gt;If you want to know why CS50 chooses to teach C check these out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=xCOj6vTqMxU"&gt;Why C?- CS50 Podcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.quora.com/Why-does-CS50-at-Harvard-use-C-as-its-primary-language"&gt;David J.Malan's answer on Quora on why CS50 teaches C&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was developed in the early '70s by Dennis Ritchie at AT&amp;amp;T Bell Laboratories.&lt;/p&gt;

&lt;p&gt;C as a language is '&lt;em&gt;higher-level'&lt;/em&gt; however it allows the user to get close to the hardware and has &lt;em&gt;'lower-level abilities'&lt;/em&gt; because it was originally developed as a systems programming language.&lt;/p&gt;
&lt;h3&gt;
  
  
  Higher-level vs Lower-level
&lt;/h3&gt;

&lt;p&gt;Initially computers could be programmed in &lt;em&gt;binary&lt;/em&gt;, that is sequences of &lt;code&gt;0s and 1s&lt;/code&gt; or otherwise known as &lt;em&gt;machine code&lt;/em&gt;, because they are directly understood by the computer.&lt;/p&gt;

&lt;p&gt;Next came Assembly languages that were a bit more higher level compared to binary code, because Assembly consists of symbolic names and statements that correspond to specific machine instructions. But for that reason it is regarded as a lower level language.&lt;/p&gt;

&lt;p&gt;Higher level languages(like C) use English like syntax and math symbols as instructions and are much more easier for humans to understand and write compared to the other two. They are also machine independent.&lt;/p&gt;

&lt;p&gt;Higher level languages are either &lt;em&gt;compiled&lt;/em&gt; or &lt;em&gt;interpreted&lt;/em&gt;. C is a compiled language.&lt;/p&gt;
&lt;h3&gt;
  
  
  Compiler
&lt;/h3&gt;

&lt;p&gt;Although programs are written to be understood by humans, the code we write will not be understood by the computers. They only understand binary.&lt;br&gt;
We have to convert our code or &lt;code&gt;source code&lt;/code&gt; to &lt;code&gt;machine code&lt;/code&gt; (binary, the &lt;code&gt;0&lt;/code&gt;s and &lt;code&gt;1&lt;/code&gt;s). That is done with the help of a piece of software, a program called a compiler. It analyzes the program developed with source code and translates it into a form that is then ready to be run and executed by our computer's hardware.&lt;/p&gt;
&lt;h3&gt;
  
  
  Write, compile, run
&lt;/h3&gt;

&lt;p&gt;I was curious about how you can compile C code on your own local  machine, however CS50 offers CS50  IDE which is excellent. It's cloud baded and offers many features that are referred to as training wheels to ease you in to the language. &lt;/p&gt;

&lt;p&gt;The first step is to type code. I recommend using their own  IDE for the course but if you are also curious, this can be done using either VSCode or another text editor, like the command line text editor VIM.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;On local machine:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write code and save it in a file. Give it any name you want but end it with &lt;code&gt;.c&lt;/code&gt;. It's a file extension and a convention that indicates that the file is written in C. That is our source code and represents the language syntax. Then you can begin the compilation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc test.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;gcc&lt;/code&gt; is a special command that starts the compilation process on your system. Unix systems(Linux, MacOS) come with the C compiler built-in.&lt;br&gt;
&lt;code&gt;test.c&lt;/code&gt; is the file name.&lt;/p&gt;

&lt;p&gt;At this stage of the compilation, syntax is checked and if there are any mistakes the compiler lets us know and the process ends. Mistakes I often made were missing the semicolon when it was needed(damn you semicolons!), not defining a variable, deleting by accident a curly bracket. So it's time to correct your code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3ohuPDuPHDuGnVtp5u/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3ohuPDuPHDuGnVtp5u/giphy.gif" alt="two hours later" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/iVDo6InQKyW8o/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/iVDo6InQKyW8o/giphy.gif" alt="breaking computer" width="471" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With all errors corrected you have to use the previous command again and the translation to machine code starts and a a new file is created which is &lt;em&gt;executable&lt;/em&gt; and is ready to be run. This file is called &lt;code&gt;a.out&lt;/code&gt; by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can give it a different name however with using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc test.c &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nb"&gt;test&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;test.c&lt;/code&gt; is the source code, &lt;code&gt;-o&lt;/code&gt; stands form output, and &lt;code&gt;test&lt;/code&gt; is the executable program to be created.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Last step is to run it with &lt;code&gt;./test&lt;/code&gt;.(&lt;code&gt;./&lt;/code&gt; means run this file from the current folder I'm in)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;From CS50 IDE&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;CS50 IDE provides a built in command for compiling.&lt;br&gt;
 That is &lt;code&gt;make test&lt;/code&gt;. The &lt;code&gt;make&lt;/code&gt; command compiles a file called &lt;code&gt;test.c&lt;/code&gt; and translates the English-like syntax to machine code by creating an executable file &lt;code&gt;test&lt;/code&gt; that contains binary instructions. To then run it we do &lt;code&gt;./test&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Hello World
&lt;/h3&gt;

&lt;p&gt;Yeah.. I know, groundbreaking and innovative but it's a tradition at this point ,right? Besides that, writing this line of code in C is not as straightforward as it is in say, Python, which is like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello world"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In C however it's like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello world"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/l0He8i34poZIo3kY0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l0He8i34poZIo3kY0/giphy.gif" alt="a bit too much" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a lot going on there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/code&gt; and other files ending with &lt;code&gt;.h&lt;/code&gt; are header files we put at the top of our program. They are files that allow access to functions.(This one stands for &lt;code&gt;standard input output&lt;/code&gt; and gives the ability to get input and output from user.) Another similar file is the &lt;code&gt;#include cs50.h&amp;gt;&lt;/code&gt; which is a CS50 library(pre-written code) that we can use in our program.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;int main (void){}&lt;/code&gt; is the main function of our program, gets things started.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;printf()&lt;/code&gt; is a function, a verb, it does something(prints something to the screen).Functions can take arguments(In this case "Hello word" is an argument, an input to the function)&lt;/li&gt;
&lt;li&gt;Can store values in variables, before doing so we must specify the variable's data type:
like &lt;code&gt;bool&lt;/code&gt;(either &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;), &lt;code&gt;char&lt;/code&gt;(a single character), &lt;code&gt;string&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;,&lt;code&gt;long&lt;/code&gt;(an int that can count higher),&lt;code&gt;float&lt;/code&gt;(decimal number), &lt;code&gt;double&lt;/code&gt;(decimal that can count higher)&lt;/li&gt;
&lt;li&gt;To declare a new variable be sure to specify its data type, a name for a variable and optionally what the initial value should be :
&lt;code&gt;string name = "Dionysia";&lt;/code&gt;
&lt;code&gt;int counter = 0;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Don't forget semicolons, they can take years from your life.&lt;/li&gt;
&lt;li&gt;strings use double quotes &lt;code&gt;""&lt;/code&gt; whereas chars use single quotes &lt;code&gt;''&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;f&lt;/code&gt; in &lt;code&gt;printf&lt;/code&gt; stands for format code, it's a placeholder when we don't know a value. A substitute for a variable.
&lt;code&gt;%s&lt;/code&gt; for string, &lt;code&gt;%i&lt;/code&gt; for int, &lt;code&gt;%c&lt;/code&gt; for char, &lt;code&gt;%f&lt;/code&gt; for floats and doubles, &lt;code&gt;%li&lt;/code&gt; for long int.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;//&lt;/code&gt; single line comment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/* */&lt;/code&gt; multi line comment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;=&lt;/code&gt; assignment operator, &lt;code&gt;==&lt;/code&gt; compare two values,&lt;code&gt;||&lt;/code&gt; logical OR operator( true when either condition is true), &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; logical AND operator(true when both conditions are true)&lt;/li&gt;
&lt;li&gt;Math operators: &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;,&lt;code&gt;/&lt;/code&gt;,&lt;code&gt;%&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conditions:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conditions:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nf"&gt;if&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// infinite loop&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cm"&gt;/* first initialize a variable,
    set a condition to check, and finally increment
    */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cm"&gt;/*do something at least once then check
     condition and repeat until no longer true
     */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Problem Sets
&lt;/h3&gt;

&lt;p&gt;I was in two minds  whether to write about this because I was sure I would rant about it. I found ridiculous the fact that first there is a problem asking from  you to  get  a user's name   and greet them ,to then later on have to check the validity of a credit card! You go from 'Hello world' to very complex stuff. Maybe others would disagree with this, whoever it can be discouraging when you are learning on your own.&lt;/p&gt;

&lt;p&gt;The walkthroughs  were not much help to begin with, but after you watch them over 10 times, you can see there are subtle hints on how to do something.&lt;/p&gt;

&lt;p&gt;I did a lot of Googling around trying to figure out how to solve something in C, and even in another language in some cases. Breaking a problem into small pieces and checking how one small requirement can be done helped me to solve the whole problem eventually.&lt;/p&gt;

&lt;p&gt;They were very challenging, to say the least. For me the most difficult, and least favourite, was the Mario less. Figuring out the amount of spaces needed took me ages. I did get to understand nested for loops so that was good.&lt;/p&gt;

&lt;p&gt;Mario more was very easy once you had completed the less part, as it built up from it and only required a couple of extra lines of code.&lt;/p&gt;

&lt;p&gt;Cash was my favourite and the fastest to complete.&lt;/p&gt;

&lt;p&gt;Credit was also a favourite and it seemed like a real life -on the job- kind of problem to solve so I had fun trying to tackle this. Very tricky if you have never done anything like that before, but you need to make use of the &lt;code&gt;\&lt;/code&gt; and &lt;code&gt;%&lt;/code&gt; operators.&lt;br&gt;
You have to check if a credit card is valid with a &lt;code&gt;checksum&lt;/code&gt;(a mathematical relationship between at least one number and others) implementing the Luhn algorithm which was developed by Hans Peter from IBM. It can help computers detect fraudulent numbers.&lt;br&gt;
Here you can learn more about the Luhn algorithm :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/luhn-algorithm/"&gt;Article on Luhn algorithm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Luhn_algorithm"&gt;Wikipedia explanation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=wsphC8V36i0&amp;amp;t=3s"&gt;Excellent video explanation on how the algorithm works&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That was it for Week 1 of CS50.&lt;br&gt;
I'm sure it will only get more challenging from now on but I'm looking forward to the Python weeks.&lt;/p&gt;

&lt;p&gt;📚 Resources I've been getting value from&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For C&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/the-c-beginners-handbook/"&gt;The C Beginner Handbook by Flavio copes. Extremely helpful, downloaded the epub version&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.kobo.com/gb/en/ebook/programming-in-c-3"&gt;Programming in C book&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nostarch.com/Effective_C"&gt;Effective C book- I love No Starch Press books!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This week introduces the command line also&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/the-linux-commands-handbook/"&gt;The Linux Command Handbook- again from Flavio. His guides are very helpful&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.codecademy.com/articles/command-line-commands"&gt;List of Command Line Commands, article from Codecademy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=a0EKtHCoCXU"&gt;Found this video on the command line on CS50 Youtube channel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you taken CS50? Or do you program in C? Any thoughts/ advice would be appreciated 😃&lt;/p&gt;

&lt;p&gt;Thanks for reading! 💫&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>devjournal</category>
      <category>beginners</category>
    </item>
    <item>
      <title>CS50 Journal : Week 0</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Wed, 21 Oct 2020 12:08:00 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/cs50-journal-week-0-236a</link>
      <guid>https://dev.to/deniselemonaki/cs50-journal-week-0-236a</guid>
      <description>&lt;h1&gt;
  
  
  Computational Thinking, Scratch
&lt;/h1&gt;

&lt;p&gt;So I am finally embarking on the journey that is CS50. And these are my notes from week 0.&lt;/p&gt;

&lt;p&gt;After a lot of hesitation and a lot of saying to myself that &lt;em&gt;'I'll do it at some point, just not now, it's not the right time'&lt;/em&gt; I came to the conclusion that 'You know what? Right now is the best time'.&lt;/p&gt;

&lt;p&gt;I was doing tutorial after tutorial and they have been holding my hand during my coding journey so far.When the  time to practice codewars came,  I was taken aback by my inability to do even the most seemingly "easy" ones. I stumbled, I got frustrated and realized that I can't solve problems to save my life. When face to face with a coding challenge my first instinct is to panic and want to be done with it,solve it immediately with the first try and move on to the next thing.Now that is some unrealistic expectations right there. It doesn't work that way.&lt;/p&gt;

&lt;p&gt;My brain associates them with Math class during my school years and I feel like I get PTSD when remembering that I was told 'You are just terrible at maths, you can't do anything science related' by my teachers. I want to work on that and change that mindset and fear.&lt;/p&gt;

&lt;p&gt;So I taking CS50 to work on my problem solving skills and gain an understanding of the fundamentals. I am hoping that by the end of it I'll feel more confident and learn new skills that will serve me in the future.&lt;/p&gt;

&lt;p&gt;Should you do it? &lt;strong&gt;Yes&lt;/strong&gt;. The course starts off by saying that 2/3 of CS50 students have never taken a Computer Science class before. So if you come from a non-technical background or have little to non programming experience this course is for you too.&lt;/p&gt;

&lt;p&gt;My favourite quote mentioned in this week's class was :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What matters in this course is not so much where you end up relative to your classmates but where you end up relative to yourself when you began &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Write that down somewhere where you can see it everyday. &lt;/p&gt;

&lt;p&gt;Even more,it is mentioned that the course is less about programming itself and just learning to code. It's more about problem solving. The principals learned on the course can be applied to any area of work and even life itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/5dkiNJvWnL1RK/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5dkiNJvWnL1RK/giphy.gif" alt="amen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  First Impressions
&lt;/h2&gt;

&lt;p&gt;I'll start off by saying that it's a state of the art production.The visuals, the video quality,the cinematography-it could easily be a TV series-,the notes available, the assignments,the website itself. It shows that a lot of work has been put into it. The teacher,David J. Malan, is just &lt;em&gt;amazing&lt;/em&gt;. His energy is infectious,he is thorough with his explanations and he doesn't assume any previous knowledge.He is engaging and manages to keep your attention throughout the class.He clearly loves what he does and that comes across.&lt;/p&gt;

&lt;h2&gt;
  
  
  Talk binary to me
&lt;/h2&gt;

&lt;p&gt;So what is the essence of Computer Science? Problem solving. And what is problem solving? Taking details, information about a problem (&lt;strong&gt;input&lt;/strong&gt;), and generating  a result, a solution to that problem(&lt;strong&gt;output&lt;/strong&gt;). Everything  in between that process is the magic that happens or else the code that we'll write. The picture below was used to illustrate this point :&lt;/p&gt;

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

&lt;p&gt;However to get to that stage, a common language has to be used in order to represent those inputs and outputs. Computers have the ability to  store all kinds of information from numbers to letters, sounds, videos and images. But how are all of these represented in a standardised way?&lt;/p&gt;

&lt;p&gt;For  representing &lt;strong&gt;numbers&lt;/strong&gt; we are already familiar with two numeral systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;em&gt;unary&lt;/em&gt; system ( e.g. one finger to represent one thing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;em&gt;decimal&lt;/em&gt; system(or base 10) which consists of 10 digits from the numbers  &lt;code&gt;0-9&lt;/code&gt;.&lt;br&gt;
An example was used to illustrate this,the system we learned in school and now we just do mental math and don't really think about the process behind it.Say we have the number one hundred twenty three, &lt;code&gt;123&lt;/code&gt;. How did we get to that number?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each place for a digit represents a power of &lt;code&gt;10&lt;/code&gt; since there are 10 possible digits for each place(10&lt;sup&gt;2&lt;/sup&gt; 10&lt;sup&gt;1&lt;/sup&gt; 10&lt;sup&gt;0&lt;/sup&gt;)&lt;br&gt;
The &lt;code&gt;3&lt;/code&gt; is in the ones column(10&lt;sup&gt;0&lt;/sup&gt;)&lt;br&gt;
The &lt;code&gt;2&lt;/code&gt; is in the tens column(10&lt;sup&gt;1&lt;/sup&gt;)&lt;br&gt;
The &lt;code&gt;1&lt;/code&gt; is in the  hundreds column(10&lt;sup&gt;2&lt;/sup&gt;)&lt;/p&gt;

&lt;p&gt;So the math we do now without even thinking is &lt;code&gt;100*1 + 10 * 2 + 1 * 3 = 123&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is all great for us humans,but computers speak &lt;em&gt;binary&lt;/em&gt;. All this information is stored in that language, a numeral system that has only two digits &lt;code&gt;0 and 1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Instead of the base 10 system used above,we can use a base 2 system where we have powers of 2 for each value(2&lt;sup&gt;2&lt;/sup&gt; 2&lt;sup&gt;1&lt;/sup&gt; 2&lt;sup&gt;0&lt;/sup&gt;)&lt;br&gt;
Examples: the number 1 in binary is 001&lt;br&gt;
The number 2 in binary is 010&lt;br&gt;
The number 3 in binary is 011&lt;br&gt;
The number 4 in binary is 100 &lt;br&gt;
The number 8 in binary is 1000 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o85xm153bM61piQV2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o85xm153bM61piQV2/giphy.gif" alt="binary"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each  &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1&lt;/code&gt; or otherwise binary digit is called a &lt;code&gt;bit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;All of the above make sense when we think that computers operate on electricity and need only &lt;code&gt;2&lt;/code&gt; values, to determine whether they're  &lt;code&gt;on&lt;/code&gt; or &lt;code&gt;off&lt;/code&gt;, or otherwise &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; or now we speak binary &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So far only numbers have been mentioned, but computers can do more than just calculate and crunch numbers. How is it made possible for us to read text, emails, watch videos and listen to music on our computers when they speak binary and save data in patterns of &lt;code&gt;0&lt;/code&gt;s and &lt;code&gt;1&lt;/code&gt;s ?&lt;/p&gt;

&lt;p&gt;In order to represent &lt;strong&gt;letters&lt;/strong&gt; we have to map numbers to those letters. That is achieved with a standard mapping named ASCII.For accent marks and emojis there is another standard named Unicode.&lt;br&gt;
So what happens when you send your friend an emoji 👽 ? The computer receives a pattern of numbers in binary which it then maps to the image of that emoji based on the Unicode standard.&lt;/p&gt;

&lt;p&gt;Emojis are essentially images and speaking of that,videos are also a sequence of  images flying by on the screen rapidly.The same with my personal favourites: gifs. They are looping images moving endlessly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/5CneX2xXm7fUI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5CneX2xXm7fUI/giphy.gif" alt="mr bean"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, whether it's numbers,text or images, whatever the medium used to display data and information, it all comes down to binary : &lt;code&gt;0 and 1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Essentially the  representation is the same,the patterns are the same, the mapping content to 0 and 1 is the same, just the context changes.Whatever media we use to display information it all always reduces to &lt;code&gt;0 and 1&lt;/code&gt;.Computer programs  know from the context of the code whether those binary numbers should be interpreted and then represented as numbers,letters or pixels(it depends whether we open an email,an image file or a spreadsheet).&lt;/p&gt;

&lt;h2&gt;
  
  
  Algorithms and Coding essentials
&lt;/h2&gt;

&lt;p&gt;When it comes to problem solving we can use our existing intuition in order to approach them.We just need to translate that intuition in a way that computers can understand. Looking back to the picture from the beginning,We are now able to represent inputs and outputs but what about the magic that happens in between, that black box? That is where algorithms come in.&lt;/p&gt;

&lt;p&gt;They are step by step instructions for solving problems.Not only do they have to be correct, precise and efficient but they need to be well designed too.&lt;/p&gt;

&lt;p&gt;So to represent and implement those algorithms we can write &lt;em&gt;pseudocode&lt;/em&gt;.  It has code-like syntax,representing ideas in a more specific version of English. It can be used to write a more simple version of our code in plain English before using an actual programming language to implement those ideas. It represents the way we are thinking and it is readable.&lt;br&gt;
Why use pseudocode? The key reasons are the fact that you are not focused on getting the syntax correct.Instead your main aim is to solve the problem in a logical manner.Also,it helps to break down big problems in smaller,more manageable steps. &lt;/p&gt;

&lt;p&gt;When writing pseudocode,we can implement certain coding concepts in plain English.The verbs or actions used to start a sentence  get the computer to do something(&lt;strong&gt;functions&lt;/strong&gt;). The &lt;code&gt;if, else if,else&lt;/code&gt; statements which essentially lead to different paths and decide what it is we'll do(&lt;strong&gt;conditions&lt;/strong&gt;).The questions we need to answer in order to make the above decisions which their answer is either &lt;code&gt;true or false&lt;/code&gt;(&lt;strong&gt;boolean expressions&lt;/strong&gt;). The repetitive cycles of doing something again and again(&lt;strong&gt;loops&lt;/strong&gt;). All of the above boil down to implementations of algorithms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scratch
&lt;/h2&gt;

&lt;p&gt;In this week, the course starts off with Scratch, a graphical programming language developed by MIT media lab that represents programming fundamentals and essentially you learn by playing. It takes the focus away from syntax,curly braces,semicolons and instead pays attention to learning the basic concepts,the  thinking process behind solving coding problems and how to approach them, all done in a playful way using puzzle pieces which you drag and drop. &lt;/p&gt;

&lt;p&gt;Some of the more advanced examples available to see in the course  were amazing and I was an awe of what you can achieve with Scratch and the kind of games you can build. Check out &lt;a href="https://scratch.mit.edu/projects/37412/editor/" rel="noopener noreferrer"&gt;this one&lt;/a&gt; which was my favourite&lt;/p&gt;

&lt;p&gt;To be honest, Scratch was much harder than what I imagined it to be, and even though it's used to teach children how to program, it is really challenging. I spent more time than I would like to admit on the assignment and I'm not satisfied with the result but at least it's a start. &lt;a href="https://scratch.mit.edu/projects/434787612/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is first  my attempt on the assignment and &lt;a href="https://scratch.mit.edu/projects/437514277/" rel="noopener noreferrer"&gt;here&lt;/a&gt; is my second attempt after watching the walkthrough.&lt;/p&gt;

&lt;p&gt;Try and have fun with it and understand the basic concepts used(like variables,loops,conditions), but don't get too caught up with it like I did.&lt;/p&gt;

&lt;p&gt;At the end of this week's class it was mentioned also that programming is in fact like Scratch, it's puzzle pieces put together in a way that makes sense. We start small, from something simple and build up to something more complex. In that process we should take into account the design of those puzzle pieces(programs) and how many steps it takes to get to the end result. That is what DRY is (Don't Repeat Yourself).The goal of DRY is to prevent repeated logic. This principle not only ensures that code is reusable, but it also doesn't repeat itself and if a change is needed,we only need to change it in one place. That means less errors in the long run! &lt;/p&gt;

&lt;h3&gt;
  
  
  📚 Resources used
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cs50.harvard.edu/college/2020/fall/notes/0/" rel="noopener noreferrer"&gt;CS50 notes from their website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=Tpl7k8IOT6E&amp;amp;list=PL7D2gu7LPEhOhEA64ynZFPbqb2hSgbuXv&amp;amp;index=2" rel="noopener noreferrer"&gt;CS50 YouTube video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=697pD31GCZg&amp;amp;t=8s" rel="noopener noreferrer"&gt;CS50 Walkthrough to problem set&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=7MUErafri48&amp;amp;list=PLeQfFYu4ZfybpGQfAyl4gQbqxFgDZuAAU" rel="noopener noreferrer"&gt;Anna Lytical's YouTube video on concepts similar to those covered in CS50 week 0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=PwGA4Lm8zuE" rel="noopener noreferrer"&gt;Pseudocode -Codecademy video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=L2cV6VZDGa0" rel="noopener noreferrer"&gt;DRY -Codecademy video&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it for this week's notes! Thanks for reading 😃&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Don't fear the command line: Text Editors</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Thu, 10 Sep 2020 14:20:23 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-text-editors-6lh</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-text-editors-6lh</guid>
      <description>&lt;p&gt;One topic that can be pretty intimidating when learning the command line is text editors. Their interface looks different and they have all these new commands that we need to use in order to enter text, make changes to the text and save all of our work. What I find the most scary part and where  I fear that things could go wrong, is not knowing  how to exit those editors.So I make sure that is the first command I learn.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3WdUt1PX5mlSo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3WdUt1PX5mlSo/giphy.gif" alt="trying to find a way out"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So in this post I'll give a basic overview of two of the most frequently used and  most popular command line text editors in Linux and &lt;a href="https://en.wikipedia.org/wiki/Unix-like" rel="noopener noreferrer"&gt;Unix like systems&lt;/a&gt; : nano and Vim. My goal is to show you how to do basic editing and saving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Text Editors. What is that?
&lt;/h2&gt;

&lt;p&gt;Text editors are programs used to edit files. Those files could be text files we have written ourselves or our shell's startup and configuration files where we could make certain changes if we wanted to. So, text editors can be similar to word processors like Google Docs or Microsoft Word in a way, as they allow us to edit words on a screen and move the cursor around.&lt;br&gt;
The main difference of text editors with word processors is the fact that text editors only support pure text and  they contain features that allow us to write and run programs.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Types of  text editors
&lt;/h3&gt;

&lt;p&gt;There are two basic categories when it comes to  text editors. Those are &lt;strong&gt;Graphical GUI&lt;/strong&gt; editors and &lt;strong&gt;Text Based&lt;/strong&gt; command line editors .&lt;br&gt;
 Some of the most popular &lt;strong&gt;graphical&lt;/strong&gt; editors in Linux are KDE and GNOME. GNOME comes with a default  editor called &lt;em&gt;gedit&lt;/em&gt; or if we search in the GNOME menu it's called &lt;em&gt;'text editor'&lt;/em&gt;.KDE comes with three, which are : &lt;em&gt;kedit&lt;/em&gt;,&lt;em&gt;kwrite&lt;/em&gt; and &lt;em&gt;kate&lt;/em&gt;. Graphical editors have the advantage of a friendlier user interface.&lt;br&gt;
Now for the &lt;strong&gt;text-based&lt;/strong&gt; console ones, the most popular are &lt;em&gt;nano&lt;/em&gt;,&lt;em&gt;vi&lt;/em&gt; and &lt;em&gt;emacs&lt;/em&gt;. Emacs is not usually installed on most Linux Systems by default.&lt;br&gt;
It's important to note that there are so many editors available  to choose from and Linux Distributions have several already installed.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/giEftvZuPAiZQBphEI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/giEftvZuPAiZQBphEI/giphy.gif" alt="so many possibilities"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Their Purpose
&lt;/h3&gt;

&lt;p&gt;It is useful to know how to do the most basic text editing in the command line as there will be times where the command line will just throw us into a text editor without any warning. So it's important to know how to get stuff done when these unexpected events happen.Nano and/or Vim are  most likely to be installed by default on your system and you may be thrown in one of these accidentally.&lt;br&gt;
For example ,I was learning about the &lt;em&gt;less&lt;/em&gt; command, which allows us to view the contents of files(&lt;code&gt;less filename.txt&lt;/code&gt;). I could view the contents but at some point wanted to edit something out, pressed &lt;code&gt;v&lt;/code&gt; on my keyboard to start editing but ended up thrown in nano ,a completely new environment.First instinct was to panic and then close the terminal window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Bp3dFfoqpCKFyXuSzP/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Bp3dFfoqpCKFyXuSzP/giphy.gif" alt="where am I?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It can look intimidating at first sight. So my goal was to learn basic text editing and saving of my work.&lt;/p&gt;

&lt;h2&gt;
  
  
  NANO
&lt;/h2&gt;

&lt;p&gt;As a bit of background history, &lt;a href="https://en.wikipedia.org/wiki/GNU_nano" rel="noopener noreferrer"&gt;nano&lt;/a&gt; was designed as a replacement for the &lt;em&gt;pico&lt;/em&gt; text editor that was supplied with the PINE email suite therefore it is quite short on editing features. Nano is a tiny sized open source editor, light weight, fast and included by default on practically every Linux and Unix-like system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To get started make sure you are in your home directory(if not type &lt;code&gt;cd ~&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Type the name of the editor followed by the name of the file you want to edit.If the file does not exist already, the editor will create it. So for example type &lt;code&gt;nano textfile.txt&lt;/code&gt; to create an empty text file in your home directory. Once nano starts you will see a screen like this :&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;At the bottom bar we see a list of commands with various available options:&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;As mentioned earlier the most important command is the &lt;code&gt;exit&lt;/code&gt; one. To do so, we press &lt;code&gt;^x&lt;/code&gt;. The &lt;code&gt;^&lt;/code&gt; represents the &lt;code&gt;CTRL(Control) command&lt;/code&gt;.This will make nano exit entirely.If we want to re-open the file, we have to press the &lt;code&gt;up arrow&lt;/code&gt; for the last command(&lt;code&gt;nano textfile.txt&lt;/code&gt;) used and then &lt;code&gt;enter&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The "write out" option means to save the file, so use the &lt;code&gt;^o&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;We will be prompted about the filename at this point, so we press &lt;code&gt;Enter&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that knowledge we can start typing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/f5BwvEFBcgzU4/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/f5BwvEFBcgzU4/giphy.gif" alt="monkey"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VIM
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l378ycV5Pt6ysGsTe/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l378ycV5Pt6ysGsTe/giphy.gif" alt="hole"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you first come across Vim, it is for sure much scarier looking than nano ,the interface is more intimidating to say the least.The  learning curve can be steep  and it feels like more could go wrong, maybe even feels like you are trapped there forever, at least I did at first. After reading a bit about it, people either love it or hate it and have quite strong opinions about it. I would like to invest some of my time to learn  this tool in a bit more depth and customise it in different ways but to get started you only need the absolute basics.&lt;/p&gt;

&lt;p&gt;Initially there was the &lt;a href="https://en.wikipedia.org/wiki/Vi" rel="noopener noreferrer"&gt;vi&lt;/a&gt; editor which has been replaced by a program called &lt;code&gt;vim&lt;/code&gt; ,short for &lt;code&gt;vi improved&lt;/code&gt;.It's an enhanced replacement,  almost always available on Unix systems, lightweight and allows for fast typing speed.There are many improvements over the traditional &lt;code&gt;vi&lt;/code&gt; editor and it is easier to use with more features.If we run &lt;code&gt;vi&lt;/code&gt; on macOS or Ubuntu it just runs &lt;code&gt;vim&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Openning Vim
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/26tk1VprH3MKCW4eY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/26tk1VprH3MKCW4eY/giphy.gif" alt="you can do it"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typing &lt;code&gt;vim&lt;/code&gt; will make the startup screen appear and look something like this &lt;/p&gt;

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

&lt;p&gt;Thankfully, it let's us know how to exit that, by typing &lt;code&gt;:q&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, to open or create a file in &lt;code&gt;vim&lt;/code&gt; from our home directory, we can type &lt;code&gt;vim textfile.txt&lt;/code&gt;. If it exists already it will open it, if not it will create a new file called &lt;code&gt;textfile.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Vim has different &lt;code&gt;modes&lt;/code&gt; and the &lt;code&gt;default&lt;/code&gt; one is the &lt;code&gt;command mode&lt;/code&gt;.That is what we'll see when we first open a file in vim. Do not type in this mode as it will just mess things up and nothing that you typed will appear. We need &lt;code&gt;insert mode&lt;/code&gt; and we achieve this by typing &lt;code&gt;i&lt;/code&gt;. The bottom of the screen will look like this &lt;/p&gt;

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

&lt;p&gt;This lets us know that it's ok  to type now, so we can add the text we want.In this case, my file is a new one and therefore empty, those tildes at the side &lt;code&gt;~&lt;/code&gt; represent empty lines.Once done with  writing ,hit &lt;code&gt;esc&lt;/code&gt; and it's back to &lt;code&gt;command mode&lt;/code&gt;, the &lt;code&gt;insert&lt;/code&gt; at the bottom of the screen will disappear.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exiting Vim 😨
&lt;/h3&gt;

&lt;p&gt;After we have made changes to our file, finished our work, and are in &lt;code&gt;command mode&lt;/code&gt; , the next step is to save what we have done.We do that with &lt;code&gt;:w&lt;/code&gt;. Then we can quit without a warning showing up, with &lt;code&gt;:q&lt;/code&gt; as we saw before.That can be also done in one step with &lt;code&gt;:wq&lt;/code&gt;.We save and exit at the same time.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:q&lt;/code&gt; does not work when trying to quit with unsaved changes.If we made changes to a file but don't want to save, just exit then we do &lt;code&gt;:q!&lt;/code&gt; for quitting without saving.&lt;/p&gt;

&lt;p&gt;There will be times when &lt;code&gt;:q&lt;/code&gt; doesn't work and to exit vim &lt;em&gt;no matter what&lt;/em&gt; we type &lt;code&gt;:qa!&lt;/code&gt;. This basically says &lt;/p&gt;

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

&lt;h3&gt;
  
  
  Extra Reading 📚
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One article on exiting vim that caught my eye by it's title was &lt;a href="https://www.freecodecamp.org/news/one-out-of-every-20-000-stack-overflow-visitors-is-just-trying-to-exit-vim-5a6b6175e7b6/" rel="noopener noreferrer"&gt;this one&lt;/a&gt; by Quincy Larson.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/vim-editor-modes-explained/" rel="noopener noreferrer"&gt;On vim editor modes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Learn Interactively
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://vim-adventures.com/" rel="noopener noreferrer"&gt;vim adventures&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.openvim.com/" rel="noopener noreferrer"&gt;open vim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vimgenius.com/lessons/vim-intro" rel="noopener noreferrer"&gt;vim genius&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vimforvscode.com/" rel="noopener noreferrer"&gt;vim for VSCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;we can type &lt;code&gt;:help&lt;/code&gt; from the &lt;code&gt;command mode&lt;/code&gt; and it'll start the tutor or if we type &lt;code&gt;vimtutor&lt;/code&gt; from our home directory before entering vim there are some interactive lessons there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was a very basic overview of nano and vim and how to get started using them.Thanks for reading.😃&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>vim</category>
      <category>linux</category>
    </item>
    <item>
      <title>Don't fear the command line:Inspecting and Interacting with Files</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Fri, 14 Aug 2020 09:47:33 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-inspecting-and-interacting-with-files-128d</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-inspecting-and-interacting-with-files-128d</guid>
      <description>&lt;p&gt;There is so much more power in the command line than just navigating through folders , creating new files and then renaming or deleting them.&lt;br&gt;
There is the opportunity to actually inspect the contents of files in great detail ,  and search through them when we want to find something specific. The most fascinating part is the fact that we are able to interact with files from the web and actually download them!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/fpXxIjftmkk9y/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/fpXxIjftmkk9y/giphy.gif" alt="surpise"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my last post I wrote about the &lt;code&gt;cat&lt;/code&gt; command that literally dumps the contents of files to the screen. If you fancy having a read about that you can check it out here &lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/deniselemonaki" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F411754%2F800b5463-a23e-4997-8098-2d8cfafdf462.jpg" alt="deniselemonaki"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/deniselemonaki/don-t-fear-the-command-line-redirecting-and-appending-3414" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Don't fear the command line: Redirecting And Appending&lt;/h2&gt;
      &lt;h3&gt;Dionysia Lemonaki ・ Jul 21 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#codenewbie&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;When it comes to &lt;code&gt;cat&lt;/code&gt; to examine file contents we can be quite restricted and that command doesn't work particularly well with longer files that contain hundreds of words, as it goes through the file really fast and  just leaves us at the end.That way, the  only option to search through the file is to use the scrollbar to navigate which can be quite tiring if the file is really long. It's more useful when used for files a few lines long.There are other commands that are more helpful to use when it comes to inspecting files that their contents  are too long to fit into a single screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heads or Tails?
&lt;/h2&gt;

&lt;p&gt;Two complimentary commands  useful for when we know we just want to inspect a particular part of the file or specifically  the beginning or end of a file is &lt;code&gt;head&lt;/code&gt; and &lt;code&gt;tail&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tail
&lt;/h3&gt;

&lt;p&gt;This command  by default outputs  the last &lt;code&gt;10&lt;/code&gt; lines of a file.However ,if we want to be more specific and change the number of lines shown, that can be done with the &lt;code&gt;-n&lt;/code&gt; option that controls the &lt;code&gt;count&lt;/code&gt; :&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="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 3 textfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way, only the last three lines will be shown in the terminal.&lt;/p&gt;

&lt;p&gt;One of the most useful ways to use &lt;code&gt;tail&lt;/code&gt; is to view a file that is actively changing.For that we use the &lt;code&gt;-f&lt;/code&gt; option which stands for &lt;code&gt;follow&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One example for that could be  to monitor files used to log activity of web servers or otherwise a practice called &lt;code&gt;tailing the log file&lt;/code&gt;.To achieve that ,in one terminal tab we simulate the creation of a log file by  pinging  a server ,where the &lt;code&gt;ping&lt;/code&gt; command pings a server to see if it's working , and we then redirect that output to a log file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping google.com &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; google.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a second tab(&lt;code&gt;CMD + T&lt;/code&gt;) we type the command to tail the log file&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="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; google.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We then see different data on that tab,that keeps on updating.&lt;br&gt;
To stop this process  we hit &lt;code&gt;control + c&lt;/code&gt; on both tabs.&lt;/p&gt;

&lt;p&gt;On that note, something similar that can be done  with &lt;code&gt;tail -f&lt;/code&gt; is to view in real time what is being added to a file of ours, anything being added would show up immediately.Similar to what I described above, in one tab we type our commands with  what we want to add to a file:&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="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'I am adding this line'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; textfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'I am also adding one more line'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; textfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a second tab ,the tail tab, we view in real time the changes we are making.&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="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; textfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switching between the two tabs shows us  &lt;code&gt;tail -f&lt;/code&gt;  in action and how it works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/EfEFcSNKrH70c/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/EfEFcSNKrH70c/giphy.gif" alt="ping"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Head
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;head&lt;/code&gt; command works exactly the same way as the &lt;code&gt;tail&lt;/code&gt; command, only in this case it outputs the first &lt;code&gt;10&lt;/code&gt; lines of a file.To change that number we can use the &lt;code&gt;-n&lt;/code&gt; option as we did in &lt;code&gt;tail&lt;/code&gt; above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Less is more
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;less&lt;/code&gt; command is the most useful one in my opinion to search through long files.The variety of shortcuts available make it easy to navigate a file and look for something very specific if you wish for it.&lt;br&gt;
Originally the &lt;code&gt;less&lt;/code&gt; program was designed as an improvement to the &lt;code&gt;more&lt;/code&gt; program because it lacked features and  had limitations.With &lt;code&gt;less&lt;/code&gt; it's easy to view long text documents  in a page by page manner, as it allows us to move through pages both forwards and backwards.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why view a file in the first place?
&lt;/h3&gt;

&lt;p&gt;One reason for viewing files, especially files located on our system, is that many of them are  configuration files meaning they contain system settings.Some of the programs our system uses are stored in these files and have human readable plain text format.Reading them could give us some kind of understanding as to how things work.&lt;/p&gt;
&lt;h3&gt;
  
  
  How to use it
&lt;/h3&gt;

&lt;p&gt;Less is used just for reading and not writing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;less textfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;throws us straight into reader mode &lt;/p&gt;

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

&lt;p&gt;Less is an interactive program and let's us navigate through files in several useful ways.Below is a table with some of the most useful keyboard commands.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Space bar/ &lt;code&gt;^+F&lt;/code&gt;/&lt;code&gt;F&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;move forward one page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;^+B&lt;/code&gt;/&lt;code&gt;B&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;move back one page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;move to the end of the file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1G/g&lt;/td&gt;
&lt;td&gt;move to the beginning of the file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;nG(where &lt;code&gt;n&lt;/code&gt; an integer)&lt;/td&gt;
&lt;td&gt;move to that number of line specified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/&lt;/code&gt; string&lt;/td&gt;
&lt;td&gt;search for a string of words&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;move to the next search result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;N&lt;/td&gt;
&lt;td&gt;move to the previous search result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;H&lt;/td&gt;
&lt;td&gt;display help&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;q&lt;/td&gt;
&lt;td&gt;quit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you want to read further on less you can check the &lt;a href="https://en.wikipedia.org/wiki/Less_(Unix)" rel="noopener noreferrer"&gt;wikipedia page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interaction
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;curl&lt;/code&gt; command allows us to interact with &lt;a href="https://en.wikipedia.org/wiki/URL" rel="noopener noreferrer"&gt;URLs&lt;/a&gt; in order to transfer data to and from a server, make HTTP requests and download files from the web.It grabs data from or to a server and we can use it to grab public domain text.It will pretty much take any URL on the web.It stands for &lt;code&gt;C (SEE) URL&lt;/code&gt; which basically means to see a web address.&lt;br&gt;
If we typed&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we would get this in return&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fathnn6n5vssbms76a3fq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fathnn6n5vssbms76a3fq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
which is not that helpful.Without using any options it displays the specified resource to the standard output.The URL is loaded and the contents are printed out.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When using the &lt;code&gt;-s&lt;/code&gt; option ,the action is &lt;code&gt;silent&lt;/code&gt; or muted, as a progress meter is not shown, neither are error messages displayed.&lt;br&gt;
If for some reason we just wanted to view the source code(the way we can view it through the browser developer tools), we need to follow redirects with the &lt;code&gt;-L&lt;/code&gt; option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get &lt;code&gt;curl&lt;/code&gt; to write the data to a file rather than just displaying it to the terminal, we can actually save it to one, which  is a helpful feature.&lt;/p&gt;

&lt;p&gt;The lowercase option &lt;code&gt;-o&lt;/code&gt; downloads the file and saves it to the name we have defined and would like to save it under(in this case &lt;code&gt;google.html&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt;  google.html google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When using the &lt;code&gt;-I&lt;/code&gt; option it includes header information  such as HTTP headers on status codes for the address&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-I&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The basic pattern that &lt;code&gt;curl&lt;/code&gt; uses is to start with the command(&lt;code&gt;curl&lt;/code&gt;),followed by some options, followed by the objects we want to actually operate on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/1AP8EcNxHvqNVcPXW2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/1AP8EcNxHvqNVcPXW2/giphy.gif" alt="fascinating"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Those are just some of the ways we can inspect in detail and interact with files both our own and from the web.&lt;/p&gt;

&lt;p&gt;Thanks for reading!😃&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>bash</category>
    </item>
    <item>
      <title>Some thoughts lately</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Sun, 02 Aug 2020 15:46:11 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/some-thoughts-lately-57mg</link>
      <guid>https://dev.to/deniselemonaki/some-thoughts-lately-57mg</guid>
      <description>&lt;p&gt;I have been doing a lot of introspection and reflexion lately on what kind of career I want to have, what kind of role would suit me in the tech world and generally I often wonder where this journey will lead me to.&lt;/p&gt;

&lt;p&gt;So far there have been many ups and downs and more often than not the downs have been pretty bad. However, I am a big believer that during difficult and challenging times there is an opportunity to do the most amount of growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  A bit of a backstory
&lt;/h2&gt;

&lt;p&gt;I started dabbling with coding in 2019 and that was mostly with HTML and CSS. Before that I did not know how to do anything tech related.Maybe a Word document or a Powerpoint presentation at my best day. I wanted to change that and become tech literate.&lt;br&gt;
After some googling I came across this 'coding' term  which I had never heard before and read how anyone can learn it. It's not easy but it's possible.I read that no matter your background or previous knowledge ,you could do it.That is what attracted me to it in the first place, that opportunity to make a change in your life and the continuous learning.&lt;/p&gt;

&lt;p&gt;So I started with the absolute basics and I kept getting stuck.I was going through the same thing over and over again.Looking back I see that the perfectionist in me  was trying to memorise everything and that is such a wrong approach long term. &lt;br&gt;
I had also joined Twitter after reading that it's a great place for connecting with people that are on the same journey as you and I learnt about the '100daysofcode' hashtag. I gave that a shot but I felt such a pressure to go fast, to accomplish something big every single day.I started comparing myself to others and that was the biggest mistake I have made so far on my coding journey.I saw what others were achieving in what seemed to me a  short  amount of time and then I started doubting myself, doubting if I was smart enough for this. I started not doing as much and eventually just stopped all-together for quite a few months and picked it back up in February this year. I also changed what I was learning. Instead of focusing just on the visual side of things I am trying out Python now and learning all about the command line. I am enjoying this so much more now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do I want this to lead to?
&lt;/h2&gt;

&lt;p&gt;Lately I have been thinking what I want to do with these skills I am gaining, what I want my career to look like in a few years down the line. Knowing my personality I have been doubting if a 9-5 rigid schedule , same routine day in day out would  suit me. I value my personal freedom a lot and the feeling of not having some kind of flexibility in the times I work would make me feel trapped. Also, what type of company I would want to work for is critical to me. Not being power hungry or driven by wanting to be the best, in the spotlight or making a lot of money I don't know what kind of company would suit me.  I would need to align with the company's values and what they stand for. I care a lot about mental health, homelessness and social injustice and inequality.Working at a place where everyone is treated equally, there is a friendly atmosphere and there is a greater cause behind the work I do is what means the most to me.&lt;/p&gt;

&lt;p&gt;However, not everyone has the privilege  to even have standards at times when it comes to the job they do as bills have to be paid. So it is an anxiety of mine that I am putting in all this work and may have to "sell myself out" because I have got to make a living at the end of the day. So I do wonder where I fit in when the time will come to look for my first job in tech. I often worry that all this work may be for nothing in the end and may not even enjoy it.&lt;/p&gt;

&lt;h2&gt;
  
  
  To bootcamp or not to bootcamp
&lt;/h2&gt;

&lt;p&gt;I am a very slow learner. It took me a while to come to terms with that. I pay attention to detail and I don't move on to the next thing unless I have fully understood what I have done so far. &lt;/p&gt;

&lt;p&gt;So the thought of attending a fast paced , throw-new-information-at-your-face-everyday in a 3 month period and end up in dept afterwards does not seem appealing to me. The thought of having to learn so much in such  little time while paying all that money would be something that would cause a lot of anxiety to me. I have seen certain bootcamps that are taking into consideration mental health ,but taking into account it's costing an arm and a leg to cause you anxiety and possibly not enjoy it and make the most of it is counter-productive to me.&lt;/p&gt;

&lt;p&gt;At the same time, how likely is it for someone from a non-tech background, without going to a bootcamp or having a CS degree to get a job? I talked to someone in the industry and he told me he has heard of it through stories on Twitter but he doesn't know anyone or works with anyone who has actually done that.&lt;/p&gt;

&lt;p&gt;Hearing that was disheartening.&lt;/p&gt;

&lt;p&gt;Also many bootcamps offer career advise and coaching ,job guarantees and networking opportunities. Also the people you meet and interact with while on the bootcamp are your network , valuable connections and  could  even  turn out to be life long friends. The fact that you work in teams like you do in companies is valuable. Coding is a team effort and more than just typing commands at a computer. You don't really get that when learning on your own. Or at least it's much harder for that to happen, whereas there it's at your fingertips.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mental health tips
&lt;/h2&gt;

&lt;p&gt;After feeling panicky again that I am going too slow and worrying about what will come out of this, I have some advice that may be of help to anyone who happens to read this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you feel drained after being on social media, limit your intake.If you can't quit, don't be as active or be very careful of who you follow. Following like minded people or folks who post inspiring work can certainly help. I have seen lately how important it is for your social media to be very professional ,  to only post certain things and gain an audience to have more opportunities but I don't subscribe to that.I don't want to buy anyone's course that promises me that big companies will notice me if I have 30k followers. Not everything is for everyone and that is completely ok. Do what you have to do to keep your sanity. Social media is a bubble and it's not what really matters in life. &lt;/li&gt;
&lt;li&gt;Take breaks. I got to a point where I felt bad if I wasn't constantly doing something coding related. If I took a longer break because I was feeling tired ,I would be hard on myself. Don't do that. Our brain needs time to recharge. Going and drinking some water, going for a long walk where there is nature , taking some time for your hobbies ,is vital. You'll come back to coding feeling more refreshed.&lt;/li&gt;
&lt;li&gt;Change the hours you learn if possible. I have realised after quite some time that I am more productive during the afternoon and nighttime. In the mornings I feel sluggish and it takes me longer to grasp new concepts.&lt;/li&gt;
&lt;li&gt;Set specific goals that you want to achieve by a certain amount of time. I set daily goals, things I want to finish during the week ahead, what I want this month to look like generally speaking. And setting a time limit as for  when I want to do something specific(like submitting first application for a job) helps keep myself accountable.&lt;/li&gt;
&lt;li&gt;Be kind to yourself. This is the hardest one I find. Small acts of kindness towards ourselves each day can go a long way.&lt;/li&gt;
&lt;li&gt;Enjoy the journey. It is freaking hard. Really hard.However, the point of it  is that tech is a fun field. Learning new things is fun in and of itself. I often think that future me will look back at these days with a feeling of wanting to go back  and enjoy it more and to try not to take everything so serious. This is a move towards a new career but there is not a need for it to constantly feel heavy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't be too hard on yourself, it will work out in the end. It always does.&lt;/p&gt;

</description>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>Don't fear the command line: Redirecting And Appending</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Tue, 21 Jul 2020 09:46:07 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-redirecting-and-appending-3414</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-redirecting-and-appending-3414</guid>
      <description>&lt;p&gt;In my last post I talked briefly about a very important concept when it comes to the command line,Standard Input and Standard Output. If you would like to have a read you can catch up here :&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/deniselemonaki" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--reWMuXIP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--M3aCXu8h--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/411754/800b5463-a23e-4997-8098-2d8cfafdf462.jpg" alt="deniselemonaki"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/deniselemonaki/don-t-fear-the-command-line-making-it-echo-30o1" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Don't fear the command line: Making it echo&lt;/h2&gt;
      &lt;h3&gt;Dionysia Lemonaki ・ Jul 6 '20 ・ 3 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#codenewbie&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;This post is an introduction on the different  ways redirecting input and output can be achieved, what appending is and how it works and in the meantime we will explore ways to check our work during the process and make sure we're on the right path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/5hc2bkC60heU/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5hc2bkC60heU/giphy.gif" alt="alrighty then" width="250" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Redirection
&lt;/h2&gt;

&lt;p&gt;Through redirection we direct the input and output of a command to and from different files. It essentially reroutes standard input, standard output and standard error to and from different locations.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;To achieve redirection we use &lt;code&gt;&amp;gt;&lt;/code&gt; which is called the &lt;code&gt;redirect operator&lt;/code&gt;.Let's take an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;echo "hello, world" &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;world.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;hello, world&lt;/code&gt; is entered as the standard input. The &lt;code&gt;redirect operator&lt;/code&gt; takes the string output from echo which is the &lt;code&gt;hello, world&lt;/code&gt; printed on the screen, and redirects it to a file called &lt;code&gt;world.txt&lt;/code&gt;. This way a new file is created containing already text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Appending
&lt;/h2&gt;

&lt;p&gt;To add more lines of text to a file that already exists we use &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; , the &lt;code&gt;appending operator&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;echo "I am learning the command line" &amp;gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; world.txt
&lt;span class="go"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The appending operator is a useful addition(see what I did there?) to the normal  redirect operator.It adds the line to the end of the existing file. It can be used when we want to build up a file gradually, adding new parts to the file as we go along.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3oKIPEh5Lk3RGSIFEI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3oKIPEh5Lk3RGSIFEI/giphy.gif" alt="more!" width="480" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CAT
&lt;/h2&gt;

&lt;p&gt;To view the contents of files on the screen we use the command &lt;code&gt;cat&lt;/code&gt;. That use of the command is common, however as the  name is short for &lt;code&gt;concatenate&lt;/code&gt; , we can also use  it to combine  the contents of multiple files and therefore it takes multiple arguments. In that case the order matters and  we can reverse the order of the files, depending on what content we want to go first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;cat world.txt
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example the contents of the file world.txt are displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt; cat world.txt &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;coding.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, &lt;code&gt;cat&lt;/code&gt; takes the contents of the file on the left and redirects it to the file on the right.The redirect operator overwrites any original content that may exist in &lt;code&gt;coding.txt&lt;/code&gt;. If the file &lt;code&gt;coding.txt&lt;/code&gt; doesn't exist already, it will be created in the process.The new file will be located in the current working directory and it's contents will be  the exact same as those of &lt;code&gt;world.txt&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;cat world.txt hello.txt &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;coding.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case the output of &lt;code&gt;world.txt&lt;/code&gt; goes first in the file &lt;code&gt;coding.txt&lt;/code&gt; followed by the output of &lt;code&gt;hello.txt&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Copy or Cat?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;cp world.txt coding.txt
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can work similar to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt; cat world.txt &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;coding.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both commands overwrite the content of &lt;code&gt;coding.txt&lt;/code&gt; with that of &lt;code&gt;world.txt&lt;/code&gt;.The difference between them is &lt;code&gt;cp&lt;/code&gt; works like &lt;code&gt;copy and paste&lt;/code&gt;,it copies files and directories. &lt;code&gt;cat&lt;/code&gt; is more like &lt;code&gt;cut and paste&lt;/code&gt;,it is transferring files and directories and creating new files in the process of doing that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/VbnUQpnihPSIgIXuZv/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/VbnUQpnihPSIgIXuZv/giphy.gif" alt="cat and computer" width="384" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check yourself
&lt;/h3&gt;

&lt;p&gt;Whenever redirecting or appending contents of files, it's always a good idea to use the &lt;code&gt;cat&lt;/code&gt; command to make sure that our files have the right content and we haven't made any mistakes.&lt;/p&gt;

&lt;p&gt;Thank you for reading! 😃&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Don't fear the command line: Making it echo</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Mon, 06 Jul 2020 14:04:09 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-making-it-echo-30o1</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-making-it-echo-30o1</guid>
      <description>&lt;p&gt;The command line is used for navigating through files in our  filesystem and making changes to those files, if we wish to. However, the command line is so powerful that it can be used for more than that.&lt;br&gt;
 When we run some specific commands in the command line we can receive a stream of output in the terminal. Practically we can type a string of words, press enter and see those words  return back to us!&lt;br&gt;
In this post I'm going to show how  we can achieve that and output text on our screen.I'll also share some shortcuts to make typing easier and correct any mistakes we may make along the way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/kRk8MQLBVwc0w/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/kRk8MQLBVwc0w/giphy.gif" alt="talk to computer" width="500" height="289"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The three standard streams
&lt;/h2&gt;

&lt;p&gt;When  talking about standard streams in computing we are referring to the connected input and output communication channels and how they transfer data, in this case text, when a command is run. The distinction of standard has to do with where the input is being read from and where our output/error are being written to.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;standard input(stdin)&lt;/strong&gt;  is the information that we input into the terminal. That is done mostly by typing on our keyboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;standard output(stdout)&lt;/strong&gt; is the information displayed after our command is run, that is in most cases our terminal screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;standard error(stderr)&lt;/strong&gt; is an error message when the process has failed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's take this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello"&lt;/span&gt;
&lt;span class="go"&gt;Hello
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the echo command accepts the string "Hello" as &lt;em&gt;standard input(stdin)&lt;/em&gt; , echoes the string "Hello" back to the terminal as &lt;em&gt;standard output(stdout)&lt;/em&gt; and then returns another prompt($).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/KYIFQIusoEbaE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/KYIFQIusoEbaE/giphy.gif" alt="echoing hello" width="245" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Echoing
&lt;/h2&gt;

&lt;p&gt;The echo command is how we get the shell to print messages back to us, as it prints our text to the terminal's screen. Echo is the command and the arguments it accepts are the string of characters that we want to print.For the string of words that we use, we can either use double quotes as we did in the example above, single quotes or no quotes at all.&lt;br&gt;
If we are just using a few words it doesn't really matter which one we use as long as we are consistent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/qs6ev2pm8g9dS/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/qs6ev2pm8g9dS/giphy.gif" alt="quotes" width="480" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we decide to use quotes, more often than not we may find ourselves in a sticky situation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;echo "so long, farewell
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/bPCwGUF2sKjyE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/bPCwGUF2sKjyE/giphy.gif" alt="break computer" width="320" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems like we can't escape.&lt;br&gt;
One way is to add the closing quote , or press &lt;code&gt;Control+C&lt;/code&gt; . We can use the later in many cases when we are in trouble in the command line.&lt;/p&gt;
&lt;h3&gt;
  
  
  Typing Hacks
&lt;/h3&gt;

&lt;p&gt;When typing, there is a chance that we will make mistakes or that we'll want to make some changes along the way. Editing in the command line is fairly simple when we make full use of our keyboard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The up arrow &lt;code&gt;^&lt;/code&gt; retrieves the previous command and when pressed again it moves further up the commands we have previously typed. The down arrow goes back down again.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Control + A&lt;/code&gt; get's us to the beginning of our line.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Control + E&lt;/code&gt; moves us to the end of our line.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Control + U&lt;/code&gt; deletes everything we have written so we can start fresh.&lt;/li&gt;
&lt;li&gt;Holding down our &lt;code&gt;Option&lt;/code&gt; key and clicking on what we want to change, we manage to move the cursor to the location we wish to edit. That is an effective way of editing longer sentences.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/zQj7gC1YQ1N9m/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/zQj7gC1YQ1N9m/giphy.gif" alt="talking without knowing where it's going" width="500" height="200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Environmental Factors
&lt;/h3&gt;

&lt;p&gt;So far we have seen that the  &lt;code&gt;echo&lt;/code&gt; command has the same role as the print function in other programming languages. Besides printing strings to the screen like we talked about earlier, we can use &lt;code&gt;echo&lt;/code&gt; to print the value of &lt;em&gt;environmental variables&lt;/em&gt; to the standard output.&lt;br&gt;
The &lt;em&gt;environment&lt;/em&gt; is a working area that our shell builds every time we log in and is kept until we log out. The environment is defined by environmental variables.&lt;br&gt;
One example of an environmental variable is :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$SHELL&lt;/span&gt;
&lt;span class="go"&gt;/bin/bash
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This shows us the user's shell ,in this case it's &lt;code&gt;bash&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Variables are set by using  &lt;code&gt;$&lt;/code&gt; as a prefix.&lt;/li&gt;
&lt;li&gt;One thing to keep in mind with environment variables is that they are case sensitive and should have uppercase names. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This an introduction and quick overview of input/output in the command line and some basic editing that can be done. We also scratched the surface of a different topic, that of using variables in the command line which I am looking forward to learning more about in the future.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/8CAFRDokyQkhi/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/8CAFRDokyQkhi/giphy.gif" alt="cat on screen" width="500" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Don't fear the command line: Manipulation</title>
      <dc:creator>Dionysia Lemonaki</dc:creator>
      <pubDate>Fri, 26 Jun 2020 08:35:22 +0000</pubDate>
      <link>https://dev.to/deniselemonaki/don-t-fear-the-command-line-manipulation-1d9d</link>
      <guid>https://dev.to/deniselemonaki/don-t-fear-the-command-line-manipulation-1d9d</guid>
      <description>&lt;p&gt;On my quest to stop being intimidated by the command line, the more I learn about it, the more fascinated I become by it.&lt;/p&gt;

&lt;p&gt;In my last post ,&lt;a href="https://dev.to/deniselemonaki/don-t-fear-the-command-line-navigation-57od"&gt;which you can read here&lt;/a&gt;, I talked about the absolute basics anyone needs to get started using the terminal. But there is so much more you can do and in this post I'm going to dive deeper into not only viewing your filesystem in more detail but actually making changes to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  You got options
&lt;/h2&gt;

&lt;p&gt;We use &lt;code&gt;ls&lt;/code&gt; to list the contents of the current directory, however , we can use &lt;code&gt;ls&lt;/code&gt; with options which are usually preceded by the &lt;code&gt;-&lt;/code&gt; character .Options  modify and change the default behaviours  of the commands they are paired with. Let me explain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls -a&lt;/code&gt;  lists all contents of a directory, including hidden files and directories. Files starting with a dot &lt;code&gt;.&lt;/code&gt; are hidden and are not displayed with using &lt;code&gt;ls&lt;/code&gt; alone.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -l&lt;/code&gt; lists all contents of a directory in long format and displayed as a table. Each column represents access rights, hard links( number of child directories and files), the username ,the size of the file in bytes, the date and time the files were last modifies and the file's name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -t&lt;/code&gt; orders files and directories by the date and time they were last modified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each option can be used separately or multiple options can be used together like &lt;code&gt;-alt&lt;/code&gt; . In this case &lt;code&gt;-alt&lt;/code&gt; lists all files and directories, including hidden ones in long format, ordered by the date and time they were last modified.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Y3l2CbTxVd6oC47Bq5/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Y3l2CbTxVd6oC47Bq5/giphy.gif" alt="I like options" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  We can also use the command line to copy, move and remove files and directories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Copy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cp&lt;/code&gt; copies files and directories. To copy a file into a directory we use &lt;code&gt;cp&lt;/code&gt; with the source file as the first argument and the destination directory as the second argument.
If we have the file &lt;code&gt;codingbooks.txt&lt;/code&gt; that's inside  the &lt;code&gt;Books&lt;/code&gt; directory and we want to copy it's contents into the &lt;code&gt;Coding&lt;/code&gt; directory, then we would do :
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt; cp Books/codingbooks.txt Coding
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To copy multiple files into a directory use &lt;code&gt;cp&lt;/code&gt; with a list of the files sources as the first arguments and the destination directory as the last argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;cp Books/codingbooks.txt Books/ruby.txt Coding
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Move
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mv&lt;/code&gt; works in the exact same way as &lt;code&gt;cp&lt;/code&gt; does. We use the file we want to move as the first argument and the destination directory as the second argument. In this case however, we can use &lt;code&gt;mv&lt;/code&gt; to &lt;em&gt;also&lt;/em&gt;  &lt;strong&gt;rename files&lt;/strong&gt; . Say we want to rename &lt;code&gt;notes.txt&lt;/code&gt; to &lt;code&gt;Notes.txt&lt;/code&gt; because we changed our mind and want for files to start with capital letters:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/lPoxtQlcX30doRbHTN/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/lPoxtQlcX30doRbHTN/giphy.gif" alt="happy dance" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt; removes files.
In order to remove directories  we use &lt;code&gt;rm  -r&lt;/code&gt; . The 
&lt;code&gt;-r&lt;/code&gt; is an option that stands for &lt;code&gt;recursive&lt;/code&gt; .It modifies the command, similar to what we talked about earlier on, and deletes the directory &lt;em&gt;and&lt;/em&gt; child directories.
For example,to delete the Pictures directory:
&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 Pictures
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Be careful when using these commands because once you delete the files or directories, &lt;strong&gt;they are permanently deleted!&lt;/strong&gt; You will not be able to retrieve them from the Bin in the GUI.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/l46CnlK71u7CazMUE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l46CnlK71u7CazMUE/giphy.gif" alt="it's gone" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wildcards
&lt;/h2&gt;

&lt;p&gt;This one is the most powerful one in my humble opinion and the one that stood out to me the most. Using &lt;code&gt;*&lt;/code&gt; we can select multiple groups of files and directories. Instead of spending lot's of time dragging and dropping files in the GUI or typing in the terminal, if we know we want to select many files of a certain type or that are located in a certain directory, we can use this instead. Below I have a few examples of it's use :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To list all files in the Documents directory, in long format, that end in &lt;code&gt;.pdf&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 -l Documents/*.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To copy all files that begin with &lt;code&gt;m&lt;/code&gt; and end with &lt;code&gt;.txt&lt;/code&gt; in the current directory, to the Documents directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp m*.txt Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To move all files in the working directory  to the Pictures directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mv * Pictures
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To delete all files in the Downloads directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm Downloads/*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those are some of the ways we can manipulate and alter the file system using the terminal.&lt;br&gt;
 If you have made it this far, you deserve a cat gif&lt;br&gt;
&lt;a href="https://i.giphy.com/media/JuFwy0zPzd6jC/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/JuFwy0zPzd6jC/giphy.gif" alt="cat" width="282" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

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