<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Raffaele Perini on Medium]]></title>
        <description><![CDATA[Stories by Raffaele Perini on Medium]]></description>
        <link>https://medium.com/@periniraffaele?source=rss-268fc8b74b72------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*1hKSUQfuV4iFdl3TV9h_pA.jpeg</url>
            <title>Stories by Raffaele Perini on Medium</title>
            <link>https://medium.com/@periniraffaele?source=rss-268fc8b74b72------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:22:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@periniraffaele/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[9+1 Command-Line Commands and Terminal Shortcuts For Newbies To The Next Level]]></title>
            <link>https://medium.com/@periniraffaele/9-1-command-line-commands-and-terminal-shortcuts-for-newbies-to-the-next-level-ea031b7ef214?source=rss-268fc8b74b72------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea031b7ef214</guid>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[zsh]]></category>
            <dc:creator><![CDATA[Raffaele Perini]]></dc:creator>
            <pubDate>Fri, 21 Feb 2020 21:20:41 GMT</pubDate>
            <atom:updated>2020-02-26T14:16:46.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7aOcMDFE-MIiHNzUuelHzQ.jpeg" /></figure><p>What kind of programmer are you? If you are like me, you are not the worst, but you can do much better. Definition of <em>like me</em>? I’ll be honest with you, I just got my Master’s degree in Computer Science and, of course, as a developer, I use the <strong>command line</strong>. OK, maybe I do not use it that much, but, follow me here, it was only a few weeks ago that I started using shortcuts like ctrl + left arrow and other &#39;<em>super-advanced shortcuts</em>&#39; like ctrl + e. If you are not surprised, well you are like me, otherwise 🤷‍♀️. We can all agree, it is a <strong>lack</strong> of knowledge, a developer with an MSs is not supposed to have, but this is not the real issue, let me explain.</p><p>Do you need to know as many shortcuts and command-line command combinations as possible? The more you know the better of course, but that is not the right question, or at least not the one I asked <strong>myself </strong>in the first place. My issues were more about <em>whys</em>, for instance, <em>why haven’t I used these shortcuts before? why didn’t I learn them before? why haven’t even been interested in learning about? Why I know how to train a neural network but do not how to move the cursor on a shell?</em> Easy to say, because I did not really need to use or know them. Every time I needed to run a command, I simply copied and pasted it from <a href="https://stackoverflow.com/">StackOverflow</a> or the specific README. I just needed to understand the few important parts and that’s it. <strong>This</strong>, this is the bad behavior a developer must not have, not even thinking about that. To copy and paste stuff, without (fully) understand what you are copying, is really really <strong>bad </strong>☹️☹️☹️.</p><p>Therefore, after having spent my life holding down the left arrow key to correct the error I did typing dokcer run -p 8080:8080 -d nginx:latest, instead of press ctrl+a(which by the way <a href="https://www.tecmint.com/linux-command-line-bash-shortcut-keys/">moves the cursor to the start of a line</a>), I finally decided to<strong> improve myself</strong>, not to the level of those <a href="https://en.m.wikipedia.org/wiki/Leet">h4©/&lt;3Яz</a>, you see in many movies but, at least, to a decent one. First thing, I started looked on-line for books and tutorials and, short story, there is a lot of stuff out there. Surely, you can Google stuff on your own and have a lot of fun. After I have read <em>stuff</em> here and there, I decided to make my own list, first only to use it as a reference for myself. Nonetheless speaking with my friends and colleges, I found out there is a huge gap between people who know each single <a href="https://en.m.wikipedia.org/wiki/Vim_(text_editor)">Vim</a> command by hearth and people who still use mouse/touch-pad for copying and pasting. For those reasons, I decided to make an small article about it, but enough let&#39;s go to the real <em>stuff.</em></p><p>This is a list of the commands and shortcuts, for <strong>terminal</strong> and <strong>UNIX shells</strong>, I personally use more and I find more useful in a different kind of situation.</p><ul><li><a href="https://www.zsh.org/">zsh</a> with <a href="https://github.com/ohmyzsh/ohmyzsh">oh-my-zsh</a>. A new shell(<strong>zsh</strong>) and a powerful framework to manage the latter. Yes, the first element in this list is not a command or a shortcut at all. If you are a Unix user you should definitively consider to switch to <strong>zsh</strong>, in particular just to be able to use <strong>oh-my-zsh</strong>. This is not the main topic, so I won’t go in much detail here, I just suggest you have a look at it, especially considering <a href="https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins">plug-ins</a> and <a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes">themes</a>.</li><li>ctrl+e, ctrl+a, <em>to move the cursor to the </em><strong><em>end</em></strong><em> and to the </em><strong><em>start</em></strong><em> of a line respectively</em>. <a href="https://www.tecmint.com/linux-command-line-bash-shortcut-keys/">Here</a> you could find a lot of similar shortcuts. Bear in mind these shortcuts do apply also for many other software e.g. IDEs, text editors, and similar.</li><li>cd - : If you don&#39;t know cd means <strong>Change Directory</strong> and if you add with - it means <em>switch back to the previous directory where you were working earlier</em>. Very useful to run scripts from different places without trying to ‘<em>cd</em>’ the whole path from one to another every time.</li><li>head -n # filename &gt; filename_# , <em>creates a new file </em><em>filename_# with the first n lines of </em><em>file</em>. More specific, head, gives in output the <strong>first lines</strong> of a file, you can specify how many with the flag -n #, which # is the number. Finally, instead of print the output on the terminal, you can redirect the latter into a new file using &gt;. More generally, you can have a lot of fun using all kinds of command like head/tail/cat 😉</li><li>kill -9 &lt;pid&gt;, <em>is used to kill the process with process id </em><em>&lt;pid&gt;, with force</em>. The -9 flag, is optional but ensures to <strong>be sure to kill the process</strong>. Adding -9 sends the &quot;interrupt&quot; signal to the process with process ID &lt;pid&gt;, and <a href="https://unix.stackexchange.com/a/399440">that signal cannot be ignored</a>. Are you familiar with signals? well, I wasn&#39;t either, until I started documenting for this article. Wanna know more about signals? just type man 7 signal on your console.</li><li>rm -rf dirName, to <em>remove directory </em><em>dirName and all of its contents</em> with. The flags-r and -f stands for <strong>recursive</strong> and <strong>force</strong> respectively. Did it ever happen to you, when trying to delete a directory, to have a lot of annoying messages in output that you cannot skip? Well, -rf delete everything no-questions-asked, but be careful, this operation is not reversible.</li><li>alias c=clear, <em>creates an alias of the </em><em>clear command named c</em>. alias is a shortcut to <strong>reference a command</strong>. This was a simple example but it can be used to avoid typing long commands or as a means to correct incorrect input. Follow this <a href="https://shapeshed.com/unix-alias/">tutorial</a> to know more.</li><li>mv oldname newname, to <em>rename a file named </em><em>oldname with </em><em>newname</em>. The mv command, which stands for <em>move</em>, it usually use to indeed move files or directories from one place to another, but it could also be used to <strong>rename</strong> directories or files.</li><li>sort file &gt; sortedFile, if you want to <em>sort all the lines within </em><em>file and put the result into </em><em>sortedFile</em>. This command <strong>sorts</strong> the contents of a text file, line by line. A very quick way to sort a file don&#39;t you think?</li><li>find ~ -iname &quot;filename&quot;, to <em>recursively search for files named </em><em>filename within the home </em><em>~ directory, without taking into account the case </em><em>-iname</em>&quot;. The find command is used <strong>to search and locate</strong> the list of files and directories based on conditions you specify. You know you created a file a long time ago but you do not remember exactly the name? good news, because you can search also using regex.</li></ul><p>In conclusion, these were just few commands I now regularly use and I think could be a good start to the way of <strong>self-improvement </strong>with the world of command line. Finally, I suggest you have a look at <a href="https://dev.to/awwsmm/101-bash-commands-and-tips-for-beginners-to-experts-30je#uniq-sort-diff-cmp">this</a> useful tutorial which gives a great overview of basically all the main commands and, to have a look also to the references which, in my personal opinion are good material to know more about this stuff.</p><p>References and other links:</p><ul><li><a href="https://aktif.net/en/Aktif-Blog/Technical-Articles/Simple-Linux-Commands-for-Beginners">REAL BEGINNERS with unix shell commands</a></li><li><a href="https://dev.to/awwsmm/101-bash-commands-and-tips-for-beginners-to-experts-30je">101 Bash Commands and Tips for Beginners to Experts</a></li><li><a href="https://www.tecmint.com/linux-command-line-bash-shortcut-keys/">Commands line shortcuts like ctrl+e</a></li><li><a href="https://unix.stackexchange.com/a/399440">Difference between </a><a href="https://unix.stackexchange.com/a/399440">kill -9 and </a><a href="https://unix.stackexchange.com/a/399440">kill -INT - StackExchange</a></li><li><a href="https://www.thegeekstuff.com/2010/11/50-linux-commands/">50 Most Frequently Used UNIX / Linux Commands (With Examples)</a></li><li><a href="https://www.howtogeek.com/412055/37-important-linux-commands-you-should-know/">37 Important Linux Commands You Should Know</a></li><li><a href="https://shapeshed.com/unix-alias/">Linux and Unix alias command tutorial with examples</a></li><li><a href="https://www.geeksforgeeks.org/sort-command-linuxunix-examples/">SORT command in Linux/Unix with examples</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea031b7ef214" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>