<?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 Dhanush Vasudevaraju on Medium]]></title>
        <description><![CDATA[Stories by Dhanush Vasudevaraju on Medium]]></description>
        <link>https://medium.com/@dhanushv?source=rss-b3c02937fd13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CRgCkuBdAnwlhWHOYx2K5Q.jpeg</url>
            <title>Stories by Dhanush Vasudevaraju on Medium</title>
            <link>https://medium.com/@dhanushv?source=rss-b3c02937fd13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:06:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhanushv/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[Understanding the Data Analysis Lifecycle: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@dhanushv/understanding-the-data-analysis-lifecycle-a-step-by-step-guide-a2d29cb4c84f?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2d29cb4c84f</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Fri, 06 Jun 2025 16:16:03 GMT</pubDate>
            <atom:updated>2025-06-06T16:16:03.775Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*bCbqOXdznmJ0CiLf.png" /></figure><p>In today’s data-driven world, the ability to transform raw data into meaningful insights isn’t just a skill — it’s a superpower. Whether you area beginner analyst or refreshing your fundamentals, this guide walks you through each stage of the data analysis lifecycle, supported by practical examples and expert-recommended tools.</p><h4>🔍 1. Define the Objective &amp; Research Question</h4><p>Every solid analysis starts with a clear question.<br> Example: <em>“What factors influence student performance in online learning?”</em></p><ul><li>This aligns your exploration with business or research goals.</li><li>Helps identify which metrics matter and the kind of data needed.</li></ul><p>👉 <strong>Tip</strong>: Draft specific, measurable questions like “Which video length yields highest completion rates?”</p><h4>📥 2. Data Collection</h4><p>Gather structured data from surveys, databases, or APIs — and unstructured data like text or images.<br>GeeksforGeeks and CareerFoundry highlight methods from CSV/Excel to cloud databases.</p><ul><li>Check for consistency, privacy rules, and collection methods.</li><li>Document source, date, and any assumptions.</li></ul><h4>🧹 3. Data Cleaning &amp; Preparation</h4><p>This is often the most time-consuming yet critical phase:</p><ul><li>Handle missing values via imputation or removal.</li><li>Standardize formats: dates, currencies, capitalizations.</li><li>Detect and correct duplicates and outliers.</li><li>Convert data types and create derived fields (e.g., ‘age’ from birthdate).</li></ul><p>Experts recommend combining cleaning with early exploratory analysis.</p><h4>📊 4. Exploratory Data Analysis (EDA)</h4><p>Begin your deep dive by:</p><ul><li>Summarizing data: means, medians, variances.</li><li>Visualizing distributions via histograms, box plots.</li><li>Studying relationships through scatter plots or correlation matrices.</li></ul><p>Here, tools like pandas, Matplotlib, Seaborn, or Tableau shine.</p><p>Example: Discovering that students who revisit lecture videos more than twice show 30% higher quiz scores.</p><h4>📈 5. Data Analysis &amp; Modeling</h4><p>Depending on your question, apply techniques:</p><ul><li><strong>Descriptive analysis</strong>: summaries, pivot tables.</li><li><strong>Diagnostic analysis</strong>: correlation, hypothesis tests.</li><li><strong>Predictive analysis</strong>: regression, classification, clustering.</li><li><strong>Prescriptive analysis</strong>: recommending actions based on results.</li></ul><p>Choose techniques based on the problem scope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*gnkpseshhh-hP-wh.jpg" /></figure><h4>♟️ 6. Interpretation &amp; Insight Generation</h4><p>This is where data becomes strategy:</p><ul><li>Translate results into actionable insights (“Students who watch 80%+ of videos score 20% higher”).</li><li>Discuss limitations — e.g., sample bias or external variables.</li><li>Answer your original questions clearly and concisely.</li></ul><p>This stage validates your hard work and ties it back to real-world value.</p><h4>🧩 7. Visualization &amp; Storytelling</h4><p>Use dashboards and clean charts to communicate:</p><ul><li><strong>Power BI</strong>, <strong>Tableau</strong>, <strong>Matplotlib</strong>, or <strong>Seaborn.</strong></li><li>Focus on clarity and actionability, not fancy visuals.</li><li>Show comparisons and trends clearly to decision-makers.</li></ul><p>Your aim? Make complex data easy to understand in seconds.</p><h4>✅ 8. Communication &amp; Action</h4><ul><li>Share a one-page summary or presentation with findings.</li><li>Include hypothesis, approach, key insights, recommendations.</li><li>Use storytelling frameworks (e.g., situation–observation–recommendation).</li></ul><p>Collaboration is key — seek feedback, align with stakeholders, and plan next steps.</p><h3>🛠️ Tools &amp; Techniques at Each Stage</h3><pre>| Step          | Tools                        |<br>| ------------- | ---------------------------- |<br>| Collection    | SQL, pandas, APIs            |<br>| Cleaning      | pandas, Excel functions      |<br>| EDA           | Matplotlib, Seaborn, Tableau |<br>| Modeling      | Scikit‑learn, Statsmodels    |<br>| Visualization | Power BI, Tableau, Excel     |<br>| Reporting     | PowerPoint, Jupyter Notebook |</pre><h3>🎓 Learning Path Recommendations</h3><ol><li>Start with a clear project question and dataset.</li><li>Keep your analysis focused on solving it — don’t diverge.</li><li>Always clean data before high-level modeling.</li><li>Visualize early and often.</li><li>Interpret responsibly — highlight uncertainty.</li></ol><h3>✅ Why These Steps Matter</h3><p>By following this process, you not only become a better analyst — you also build credibility. Recruiters and hiring managers appreciate when you can articulate your analytical mindset and methodology clearly.</p><p><strong>#DataAnalysis #EDA #DataVisualization #Python #PowerBI #Tableau #CareerGrowth</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2d29cb4c84f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scripting Symphony: A Shell Script Cheat Sheet]]></title>
            <link>https://medium.com/@dhanushv/scripting-symphony-a-shell-script-cheat-sheet-d359afe5483e?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/d359afe5483e</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[hands-on-tutorials]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Mon, 11 Dec 2023 12:59:05 GMT</pubDate>
            <atom:updated>2023-12-14T10:25:59.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*uwHBPu2ruPpgZjjx.png" /></figure><p>In my previous post I had explained about Shell scripting —</p><p><a href="https://medium.com/@dhanushv/shell-scripting-explained-5a2f9ed2143b">Unleashing the Power of Shell Scripting</a></p><p>In this blog let’s learn how to create shell scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJtAw2eyyG3F7vnn-o0S_w.png" /></figure><pre>01_basic.sh<br><br>echo &quot;Hello Guys!&quot;<br><br>Output:-<br><br>Hello Guys!</pre><pre>02_comments.sh <br><br>echo &quot;Checking Comments&quot;<br><br>#This is a single line comment<br><br>#comment<br>#This<br>#is<br>#multi-line<br>#comment<br><br>Output:-<br><br>echo &quot;Checking Comments&quot;<br><br>#This is a single line comment<br><br>&lt;&lt;com<br>This<br>is<br>multi-line<br>com</pre><pre>03_vardemo.sh<br> <br>#Script to show how to use variables<br><br>a=10<br>name=&quot;Dhanush&quot;<br>age=22<br><br>echo &quot;My name is $name and age is $age&quot;<br><br>name=&quot;Dhanu&quot;<br>echo &quot;My name is $name&quot;<br><br>#Variable to store the output of a command<br>HOSTNAME=$(hostname)<br>echo &quot;Name of this machine is $HOSTNAME&quot;<br><br>Output:-<br><br>My name is Dhanush and age is 22<br>My name is Dhanu<br>Name of this machine is modus</pre><pre>04_constant_var.sh<br><br>#Constant variable<br>readonly COLLEGE=&quot;VTU&quot;<br><br>echo &quot;My college name is $COLLEGE&quot;<br><br>Output:-<br><br>My college name is VTU</pre><pre>05_ui.sh<br><br>read -p &quot;What is your name? &quot; name<br>echo &quot;Your name is $name&quot;<br><br>Output:-<br><br>What is your name? Dhanush<br>Your name is Dhanush</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qJkbRW7QQ2s7Jj-Hk8Rp3g.png" /></figure><pre>06_strings.sh <br><br>myVar=&quot;Hey Buddy, how are you?&quot;<br><br>myVarLength=${#myVar}<br>echo &quot;Length of the myVar is $myVarLength&quot;<br><br>echo &quot;Upper case is ${myVar^^}&quot;<br><br>echo &quot;Lower case is ${myVar,,}&quot;<br><br>#To replace a string<br>newVar=${myVar/Buddy/1421}<br>echo &quot;New Var is ---- $newVar&quot;<br><br>#To slice a string<br>echo &quot;After slice ${myVar:4:5}&quot;<br><br>Output:-<br><br>Length of the myVar is 23<br>Upper case is HEY BUDDY, HOW ARE YOU?<br>Lower case is hey buddy, how are you?<br>New Var is ---- Hey 1421, how are you?<br>After slice Buddy</pre><pre>07_arithmetic.ksh<br><br>#Maths Calculation<br>x=10<br>y=2<br><br>let sum=$x+$y<br>echo &quot;$sum&quot;<br><br>echo &quot;Subtraction is $(($x-$y))&quot;<br><br>echo &quot;Multiplication is $(($x*$y))&quot;<br><br>Output:-<br><br>12<br>Subtraction is 8<br>Multiplication is 20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulxxUMpaJV64yHCHUErqkg.png" /></figure><pre>08_array.sh<br><br>#Array<br><br>myArray=( 0 1 20.5 Hello &quot;Hello Guys&quot; )<br>echo &quot;All the values in the array are ${myArray[*]}&quot;<br><br>echo &quot;Value of 3rd index is  ${myArray[3]}&quot;<br><br>#How to find no. of values in an array<br>echo &quot;Length of an array is ${#myArray[*]}&quot;<br><br>#Updating our array with new values<br>myArray+=( New 30 40 )<br><br>echo &quot;Values of new array are ${myArray[*]}&quot;<br><br>Output:-<br><br>All the values in the array are 0 1 20.5 Hello<br>Value of 3rd index is  Hello Hello Guys<br>Length of an array is 4<br>Values of new array are 0 1 20.5 Hello New 30 40</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qG7pp4StVEPwW8DwhQ4gWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_swUzq6YILddloT4h0uPQ.png" /></figure><pre>09_if_else.sh<br><br>read -p &quot;Enter your marks:&quot; marks<br><br>if [ $marks -gt 40 ]<br>then<br>        echo &quot;You have Passed&quot;<br>else<br>        echo &quot;You have Failed!&quot;<br>fi<br><br>Output:-<br><br>Enter your marks:80<br>You have Passed<br><br>Enter your marks:30<br>You have Failed!</pre><pre>10_elif.sh<br><br>read -p &quot;Enter your marks: &quot; marks<br><br>if [ $marks -ge 80 ]<br>then<br>        echo &quot;Distinction&quot;<br>elif [ $marks -ge 60 ]<br>then<br>        echo &quot;First Class&quot;<br>elif [ $marks -ge 40 ]<br>then<br>        echo &quot;Second Class&quot;<br>else<br>        echo &quot;You have Failed!&quot;<br>fi<br><br>Output:-<br><br>Enter your marks: 80<br>Distinction<br><br>Enter your marks: 60<br>First Class<br><br>Enter your marks: 40<br>Second Class<br><br>Enter your marks: 20<br>You have Failed!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajN88PAlraZWpJw-bgYJKg.png" /></figure><pre>11_loops.sh<br><br>#Shorter and preferred version<br><br>for i in {2..20..2}<br>do <br>  echo &quot;Table of 2 : $i&quot;<br>done<br><br>Output:-<br><br>Table of 2 : 2<br>Table of 2 : 4<br>Table of 2 : 6<br>Table of 2 : 8<br>Table of 2 : 10<br>Table of 2 : 12<br>Table of 2 : 14<br>Table of 2 : 16<br>Table of 2 : 18<br>Table of 2 : 20<br><br>#Lengthy version<br><br>for i in 1 2 3 4 5 6 7 8 9 10<br>do<br>        echo &quot;Number is $i&quot;<br>done<br><br>Output:-<br><br>Number is 1<br>Number is 2<br>Number is 3<br>Number is 4<br>Number is 5<br>Number is 6<br>Number is 7<br>Number is 8<br>Number is 9<br>Number is 10<br><br>#Shorter version<br><br>for i in {2..20..2}<br>do <br>  echo &quot;Table of 2 : $i&quot;<br>done<br><br>Output:-<br><br>Table of 2 : 2<br>Table of 2 : 4<br>Table of 2 : 6<br>Table of 2 : 8<br>Table of 2 : 10<br>Table of 2 : 12<br>Table of 2 : 14<br>Table of 2 : 16<br>Table of 2 : 18<br>Table of 2 : 20<br><br>#Normal version<br><br>for (( i=10; i&gt;=1; i-- ))<br>do<br>  echo &quot;Number is $i&quot;<br>done<br><br>Output:-<br><br>Number is 1<br>Number is 2<br>Number is 3<br>Number is 4<br>Number is 5<br>Number is 6<br>Number is 7<br>Number is 8<br>Number is 9<br>Number is 10</pre><pre>12_for_file.sh (read names for .txt file)<br><br>#Getting values from a file names.txt<br><br>FILE=&quot;/users/mod1421/1421/names.txt&quot;<br><br>for name in $(cat $FILE)<br>do<br>        echo &quot;Name is $name&quot;<br>done<br><br>Output:-<br><br>Name is ChristopherNolan<br>Name is Yash<br>Name is DulquerSalmaan<br>Name is PrithvirajSukumaran<br>Name is ShahrukhKhan</pre><pre>13_while.sh<br><br>count=0<br>num=10<br><br>while [[ $count -le $num ]]<br>do<br>        echo &quot;Value of count var is $count&quot;<br>        let count++<br>done<br><br>Output:-<br><br>Value of count var is 0<br>Value of count var is 1<br>Value of count var is 2<br>Value of count var is 3<br>Value of count var is 4<br>Value of count var is 5<br>Value of count var is 6<br>Value of count var is 7<br>Value of count var is 8<br>Value of count var is 9<br>Value of count var is 10</pre><pre>14_for_with_array.sh<br><br>myArray=(1 2 3 HELLO Hi )<br><br>length=${#myArray[*]}<br><br>for(( i=0;i&lt;length;i++ ))<br>do<br>        echo &quot;Value of array is ${myArray[$i]}&quot;<br>done<br><br>Output:-<br><br>Value of array is 1<br>Value of array is 2<br>Value of array is 3<br>Value of array is HELLO<br>Value of array is Hi</pre><pre>15_while_with_file.sh<br><br>while IFS=&quot;,&quot; read  id name age<br>do<br>        echo &quot;Id is $id&quot;<br>        echo &quot;Name is $name&quot;<br>        echo &quot;Age is $age&quot;<br>done &lt; test.csv<br><br>Output:-<br><br>Id is id<br>Name is name<br>Age is age<br>Id is 01<br>Name is dhanush<br>Age is 22<br>Id is 02<br>Name is sonu<br>Age is 24<br>Id is 03<br>Name is bunty<br>Age is 24</pre><pre>16_case.sh<br><br>echo &quot;Choose an option&quot;<br>echo &quot;a to print date&quot;<br>echo &quot;b to print list of scripts&quot;<br>echo &quot;c to check the current location&quot;<br><br>read choice<br><br>case $choice in<br>        a)<br>                echo &quot;Today&#39;s date is:&quot;<br>                date<br>                echo &quot;Ending...&quot;<br>                ;;<br>        b)ls;;<br>        c)pwd;;<br>        *)echo &quot;Please choose a valid option&quot;<br>esac<br><br>Output:-<br><br>Choose an option<br>a to print date<br>b to print list of scripts<br>c to check the current location<br>a<br>Today&#39;s date is:<br>Fri Dec  8 18:35:29 GMT 2023<br>Ending...<br><br>Choose an option<br>a to print date<br>b to print list of scripts<br>c to check the current location<br>b<br>01_basic.ksh              06_array.ksh              11_case.ksh               16_while.ksh              21_function_demo.ksh      26_continue.sh<br>02_comments.ksh           07_strings.ksh            12_logical.ksh            17_until.ksh              22_function_with_arg.ksh  27_redirect.sh<br>03_vardemo.ksh            08_arithmetic.ksh         13_ternary.ksh            18_infinite.ksh           23_args.sh                names.txt<br>04_constant_var.ksh       09_if_else.ksh            14_loops.ksh              19_for_with_array.ksh     24_shift_args.sh          redirect.log<br>05_ui.ksh                 10_elif.ksh               15_for_file.ksh           20_while_with_file.ksh    25_break.sh               test.csv<br>Choose an option<br>a to print date<br>b to print list of scripts<br>c to check the current location<br>c<br><br>Choose an option<br>a to print date<br>b to print list of scripts<br>c to check the current location<br>d<br>Please choose a valid option<br></pre><pre>17_logical.sh<br><br>#AND OPERATOR<br><br>read -p &quot;What is your age? &quot; age<br>read -p &quot;Your country: &quot; country<br>if [[ $age -ge 18 ]] &amp;&amp; [[ $country -eq &quot;India&quot; ]]<br>then<br>        echo &quot;You can vote&quot;<br>else<br>        echo &quot;You can&#39;t vote&quot;<br>fi<br><br>Output:-<br><br>What is your age? 22<br>Your country: India<br>You can vote<br><br>OR<br><br>What is your age? 16<br>Your country: USA<br>You can&#39;t vote</pre><pre>18_ternary.sh<br><br>#cond1 &amp;&amp; cond2 || cond3<br><br>read -p &quot;Enter your age:&quot; age<br>[[ $age -ge 18 ]] &amp;&amp; echo &quot;Adult&quot; || echo &quot;Minor&quot;<br><br>Output:-<br><br>Enter your age:22<br>Adult<br><br>OR<br><br>Enter your age:16<br>Minor</pre><pre>19_until.sh  <br><br>a=0<br><br>until [ $a -eq 9 ]<br>do<br>        echo &quot;Value of a is $a&quot;<br>        let a++<br>done<br><br>Output:-<br><br>Value of a is 0<br>Value of a is 1<br>Value of a is 2<br>Value of a is 3<br>Value of a is 4<br>Value of a is 5<br>Value of a is 6<br>Value of a is 7<br>Value of a is 8</pre><pre>20_infinite.sh (infinite loop with interval)<br><br>#Infinite loop<br><br>for (( ;; ))<br>do<br>        echo &quot;Hi buddy&quot;<br>        sleep 2<br>done<br><br>Output:-<br><br>Hi buddy<br>Hi buddy<br>Hi buddy<br>Hi buddy</pre><pre>21_break.sh<br><br>#Example of break in a loop<br>#We just have to confirm if a given no. is presnt or not<br><br>no=6<br><br>for i in 1 2 3 4 5 6 7 8 9 10<br>do<br>if [ $no -eq 6 ]<br>then<br>echo &quot;$no is found!!!&quot;<br>break<br>fi<br>echo &quot;Number is $i&quot;<br>done<br><br>Output:-<br><br>6 is found!!!</pre><pre>22_continue.sh<br><br>#Example of continue in a loop<br>#To print odd numbers<br><br>for i in 1 2 3 4 5 6 7 8 9 10<br>do<br>r=$((i%2))<br>if [ $r -q 0 ]<br>then<br>continue<br>fi<br>echo &quot;Odd numbers is $i&quot;<br>done<br> <br>Output:-<br><br>Odd numbers is 1<br>Odd numbers is 3<br>Odd numbers is 5<br>Odd numbers is 7<br>Odd numbers is 9</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4caihYkKmNAsUoWx6Mnxng.png" /></figure><pre>23_function_demo.sh<br><br>#To create function<br>welcomenote () {<br>echo &quot;------------------------&quot;<br>echo &quot;Welcome&quot;<br>echo &quot;------------------------&quot;<br>}<br><br>#To call function<br>welcomenote<br>welcomenote<br><br>Output:-<br>------------------------<br>Welcome<br>------------------------<br>------------------------<br>Welcome<br>------------------------</pre><pre>24_function_with_arg.sh<br><br>welcomenote () {<br>        echo &quot;-----------&quot;<br>        echo &quot;Welcome $1&quot;<br>        echo &quot;Age is $2&quot;<br>        echo &quot;-----------&quot;<br>}<br><br>welcomenote Dhanush 22<br>welcomenote Chandra 24<br>welcomenote Sonu 24<br><br>Output:-<br>-----------<br>Welcome Dhanush<br>Age is 22<br>-----------<br>-----------<br>Welcome Sonu<br>Age is 24<br>-----------<br>-----------<br>Welcome Bunty<br>Age is 24<br>-----------</pre><pre>25_args.sh <br><br>#To access the arguments<br><br>if [ $# -eq 0 ]<br>then<br>   echo &quot;Please enter an argument&quot; <br>        exit 1<br>fi<br><br>echo &quot;First argument is $1&quot;<br>echo &quot;Second argument is $2&quot;<br><br>echo &quot;All the arguments are - $@&quot;<br>echo &quot;Number of arguments are - $#&quot;<br><br>Output:-<br><br>./25_args.sh dhanush 1421 is empid <br><br>Please enter an argument<br><br>OR<br><br>First argument is dhanush<br>Second argument is 1421<br>All the arguments are - dhanush 1421 is empid sample.txt<br>Number of arguments are - 4</pre><pre>26_shift_args.sh<br><br>#To create a user, provide username and description<br><br>echo &quot;Creating user&quot;<br>echo &quot;Username is $1&quot;<br><br>shift<br>echo &quot;Description is $@&quot;<br><br>Output:-<br><br>Creating user<br>Username is Dhanush<br>Description is 1421 is empid</pre><pre>27_redirect.sh<br><br>echo &quot;List of all files in my directory-1421 are: $(ls -lt)&quot; &gt; redirect.log<br><br>Output:- (vi redirect.log)<br><br>List of all files in my directory-1421 are: total 240<br>-rw-r--r--    1 mod1421  dba            2176 Dec 08 15:37 redirect.log<br>-rwxrwxr-x    1 mod1421  dba              77 Dec 08 15:35 27_redirect.sh<br>-rw-rw-r--    1 mod1421  dba             160 Dec 08 14:59 26_continue.sh<br>-rw-rw-r--    1 mod1421  dba             204 Dec 08 14:56 25_break.sh<br>-rw-rw-r--    1 mod1421  dba             130 Dec 08 14:53 24_shift_args.sh<br>-rw-rw-r--    1 mod1421  dba             296 Dec 08 14:48 23_args.sh<br>-rwxrwxr-x    1 mod1421  dba             285 Dec 08 13:03 11_case.ksh<br>-rwxrwxr-x    1 mod1421  dba             131 Dec 08 12:22 09_if_else.ksh<br>-rwxrwxr-x    1 mod1421  dba             265 Dec 08 11:18 22_function_with_arg.ksh<br>-rwxrwxr-x    1 mod1421  dba             116 Dec 08 11:08 16_while.ksh<br>-rwxrwxr-x    1 mod1421  dba             162 Dec 08 11:05 21_function_demo.ksh<br>-rwxrwxr-x    1 mod1421  dba             125 Dec 08 10:48 20_while_with_file.ksh<br>-rw-rw-r--    1 mod1421  dba             103 Dec 08 10:45 test.csv<br>-rwxrwxr-x    1 mod1421  dba              76 Dec 07 19:02 18_infinite.ksh<br>-rwxrwxr-x    1 mod1421  dba             336 Dec 07 18:58 06_array.ksh<br>-rwxrwxr-x    1 mod1421  dba             138 Dec 07 18:34 19_for_with_array.ksh<br>-rwxrwxr-x    1 mod1421  dba              80 Dec 07 18:16 17_until.ksh<br>-rwxrwxr-x    1 mod1421  dba             145 Dec 07 17:23 15_for_file.ksh<br>-rw-rw-r--    1 mod1421  dba              71 Dec 07 13:22 names.txt<br>-rwxrwxr-x    1 mod1421  dba              74 Dec 07 13:15 14_loops.ksh<br>-rwxrwxr-x    1 mod1421  dba             120 Dec 07 12:58 13_ternary.ksh<br>-rwxrwxr-x    1 mod1421  dba             207 Dec 07 12:53 12_logical.ksh<br>-rwxrwxr-x    1 mod1421  dba             231 Dec 07 12:22 10_elif.ksh<br>-rwxrwxr-x    1 mod1421  dba             139 Dec 07 11:55 08_arithmetic.ksh<br>-rwxrwxr-x    1 mod1421  dba              74 Dec 07 11:45 05_ui.ksh<br>-rwxrwxr-x    1 mod1421  dba             309 Dec 07 11:37 07_strings.ksh<br>-rw-rw-r--    1 mod1421  dba             110 Dec 07 11:01 02_comments.ksh<br>-rwxrwxr-x    1 mod1421  dba              32 Dec 07 10:48 01_basic.ksh<br>-rw-rw-r--    1 mod1421  dba              91 Dec 06 12:10 04_constant_var.ksh<br>-rw-rw-r--    1 mod1421  dba             263 Dec 06 12:07 03_vardemo.ksh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*4cN5aHr-qNPIiyy6sXoLPw.png" /></figure><pre>crontab -e<br><br>0 16 8 12 05  cd /users/mod1421/1421 &amp;&amp; ./27_redirect.sh<br><br>Output:-<br><br>List of all files in my directory-1421 are: total 240<br>-rw-r--r--    1 mod1421  dba            2176 Dec 08 15:37 redirect.log<br>-rwxrwxr-x    1 mod1421  dba              77 Dec 08 15:35 27_redirect.sh<br>-rw-rw-r--    1 mod1421  dba             160 Dec 08 14:59 26_continue.sh<br>-rw-rw-r--    1 mod1421  dba             204 Dec 08 14:56 25_break.sh<br>-rw-rw-r--    1 mod1421  dba             130 Dec 08 14:53 24_shift_args.sh<br>-rw-rw-r--    1 mod1421  dba             296 Dec 08 14:48 23_args.sh<br>-rwxrwxr-x    1 mod1421  dba             285 Dec 08 13:03 11_case.ksh<br>-rwxrwxr-x    1 mod1421  dba             131 Dec 08 12:22 09_if_else.ksh<br>-rwxrwxr-x    1 mod1421  dba             265 Dec 08 11:18 22_function_with_arg.ksh<br>-rwxrwxr-x    1 mod1421  dba             116 Dec 08 11:08 16_while.ksh<br>-rwxrwxr-x    1 mod1421  dba             162 Dec 08 11:05 21_function_demo.ksh<br>-rwxrwxr-x    1 mod1421  dba             125 Dec 08 10:48 20_while_with_file.ksh<br>-rw-rw-r--    1 mod1421  dba             103 Dec 08 10:45 test.csv<br>-rwxrwxr-x    1 mod1421  dba              76 Dec 07 19:02 18_infinite.ksh<br>-rwxrwxr-x    1 mod1421  dba             336 Dec 07 18:58 06_array.ksh<br>-rwxrwxr-x    1 mod1421  dba             138 Dec 07 18:34 19_for_with_array.ksh<br>-rwxrwxr-x    1 mod1421  dba              80 Dec 07 18:16 17_until.ksh<br>-rwxrwxr-x    1 mod1421  dba             145 Dec 07 17:23 15_for_file.ksh<br>-rw-rw-r--    1 mod1421  dba              71 Dec 07 13:22 names.txt<br>-rwxrwxr-x    1 mod1421  dba              74 Dec 07 13:15 14_loops.ksh<br>-rwxrwxr-x    1 mod1421  dba             120 Dec 07 12:58 13_ternary.ksh<br>-rwxrwxr-x    1 mod1421  dba             207 Dec 07 12:53 12_logical.ksh<br>-rwxrwxr-x    1 mod1421  dba             231 Dec 07 12:22 10_elif.ksh<br>-rwxrwxr-x    1 mod1421  dba             139 Dec 07 11:55 08_arithmetic.ksh<br>-rwxrwxr-x    1 mod1421  dba              74 Dec 07 11:45 05_ui.ksh<br>-rwxrwxr-x    1 mod1421  dba             309 Dec 07 11:37 07_strings.ksh<br>-rw-rw-r--    1 mod1421  dba             110 Dec 07 11:01 02_comments.ksh<br>-rwxrwxr-x    1 mod1421  dba              32 Dec 07 10:48 01_basic.ksh<br>-rw-rw-r--    1 mod1421  dba              91 Dec 06 12:10 04_constant_var.ksh<br>-rw-rw-r--    1 mod1421  dba             263 Dec 06 12:07 03_vardemo.ksh</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d359afe5483e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unraveling PL/SQL Cron Jobs: A Comprehensive Guide]]></title>
            <link>https://medium.com/@dhanushv/unraveling-pl-sql-cron-jobs-a-comprehensive-guide-ca6e8ed49de4?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca6e8ed49de4</guid>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Mon, 04 Dec 2023 09:05:27 GMT</pubDate>
            <atom:updated>2023-12-05T12:45:22.209Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*1NkTK6kLoywPOgUL.jpg" /></figure><p><strong>Introduction</strong></p><p>In my previous post I had explained about cronjob —</p><p><a href="https://medium.com/@dhanushv/demistifying-cronjobs-introduction-7b9e0b778ed4">Demistifying Cronjobs : Introduction</a></p><p>Now, lets delve further to unravel PL/SQL Cron jobs.</p><p>In the dynamic realm of database management, PL/SQL cron jobs emerge as a powerful tool. Let&#39;s delve into the what, why, how, and when of PL/SQL cron jobs to unravel their significance.</p><p><strong>What is a PL/SQL Cron Job?</strong><br>A PL/SQL cron job is a scheduled task in Oracle databases, executing predefined PL/SQL blocks at specified intervals. It brings automation to database maintenance, making repetitive tasks more manageable.</p><p><strong>Why Opt for PL/SQL Cron Jobs?</strong><br>Efficiency is the keyword. Automating routine tasks reduces manual intervention, minimizes errors, and ensures timely execution. PL/SQL cron jobs streamline processes like data backups, report generation, and system maintenance.</p><p><strong>How to Create a PL/SQL Cron Job:</strong><br>1. Define the Task: Identify the PL/SQL block representing the task you want to automate.<br>2. Create a Procedure or Function: Structure your code within a PL/SQL procedure or function.<br>3. Use DBMS_SCHEDULER: Utilize Oracle&#39;s built-in scheduler to create and manage the job.<br>4. Set Job Attributes: Specify attributes such as start time, recurrence, and duration.<br>5. Test and Deploy: Ensure your job runs smoothly in a testing environment before deploying it in production.</p><p><strong>Syntax:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*z0bnFv2Z6lhBWZBWmP44lg.jpeg" /></figure><p><strong>Explanation of parameters:</strong><br>• job_name: A unique name for your job.<br>• job_type: Specifies that it&#39;s a PL/SQL block job.<br>• job_action: The PL/SQL code you want to execute. Replace &#39;Your_PLSQL_Code&#39; with your actual PL/SQL logic.<br>• start_date: The timestamp when the job should start.<br>• repeat_interval: Defines the frequency and timing of the job. Customize `FREQ`, `BYHOUR`, `BYMINUTE`, and `BYSECOND` as needed.<br>• enabled: Set to `TRUE` to enable the job.</p><p>Remember to replace placeholder values and customize the `repeat_interval` based on your scheduling requirements.</p><p><strong>When to Use PL/SQL Cron Jobs:</strong><br>1. Repetitive Tasks: Ideal for tasks that recur at fixed intervals.<br>2. Data Maintenance: Automate data cleanup, archiving, and optimization.<br>3. Reporting: Schedule reports generation and distribution.<br>4. System Monitoring: Set up jobs to monitor system health and performance.</p><p><strong>Example:</strong></p><p>Let&#39;s say you want to create a daily backup job. Your PL/SQL block might look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*WVC1YUxwdpRrc0ZuHtYzrg.jpeg" /></figure><p>Now, you can schedule this as a cron job:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*2PjS9qdNpA2uLtgzHxvaIA.jpeg" /></figure><p>This example schedules the `daily_backup` procedure to run every day at 2 AM. Adjust the `repeat_interval` and other parameters according to your specific requirements.</p><p><strong>Conclusion:</strong><br>In the ever-evolving landscape of database management, PL/SQL cron jobs stand as stalwart allies, boosting efficiency and reliability. Understanding their implementation equips you to harness the power of automation, ensuring your database functions seamlessly and remains primed for the challenges ahead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca6e8ed49de4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demistifying Cronjobs : Introduction]]></title>
            <link>https://medium.com/@dhanushv/demistifying-cronjobs-introduction-7b9e0b778ed4?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b9e0b778ed4</guid>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Mon, 04 Dec 2023 04:29:56 GMT</pubDate>
            <atom:updated>2023-12-15T05:34:03.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>Demistifying Cronjobs : Introduction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oCmhwHGOgVVMB8bv.jpg" /></figure><h3>Introduction</h3><p>Cronjobs play a crucial role in automating tasks on Unix-like operating systems. Let&#39;s delve into what cronjobs are, why they are essential, how to use them, the different types available, their syntax, and provide practical examples.</p><p><strong>What is a Cronjob?</strong><br>A cronjob is a scheduled task in Unix-based systems that runs automatically at specified intervals. It enables users to automate repetitive tasks, making system administration and other processes more efficient.</p><p><strong>Why Use Cronjobs?</strong><br>Cronjobs eliminate the need for manual execution of routine tasks, ensuring timely and accurate performance. They are invaluable for tasks like backups, updates, and periodic maintenance.</p><p><strong>How to Use Cronjobs?<br></strong>To create a cronjob, use the `crontab` command, which manages the cron table for users. The basic syntax is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PYIIfI3m_OT0ofHGsc4m5w.jpeg" /></figure><p>Each asterisk represents a time unit (minute, hour, day of month, month, and day of week) when the task should run. You can use specific numbers or wildcards for flexibility.</p><p><strong>Types of Cronjobs:</strong><br>1. Minute-based: Executes tasks every minute.<br>2. Hourly: Runs tasks every hour.<br>3. Daily: Performs tasks once a day.<br>4. Weekly: Executes tasks once a week.<br>5. Monthly: Runs tasks monthly.<br>6. Custom Schedules:Allows for more complex timing configurations.</p><p><strong>Cronjob Syntax:</strong><br>The cron syntax consists of five fields followed by the command. Here&#39;s an example breakdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*on8qb-9a7eeDah1ckO6w9A.jpeg" /></figure><p><strong>Example:</strong><br>To schedule a task to run every day at 3:30 AM, the cronjob entry would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PYIIfI3m_OT0ofHGsc4m5w.jpeg" /></figure><p>This runs the specified command at 3:30 AM every day.</p><p><strong>How to Add/Modify Crontab</strong></p><p>User can edit their crontab jobs with the help of following crontab command:</p><pre>$ crontab -u -e</pre><p>The above command will open the personal crontab configuration of your computer system, which can be edited by using your default text editor.</p><p>There is no need to restart your crontab as it will pick up your changes automatically when you use following command.</p><pre>$ crontab -l</pre><p>To remove your crontab tasks, use the following command.</p><pre>$ crontab -r</pre><p>To add or update job in crontab, use below given command.</p><pre>crontab -e</pre><p>Command to edit other user’s crontab</p><pre>crontab -u username -e</pre><p><strong>How to List Crontab</strong></p><p>Command to view crontab entries of current user</p><pre>crontab -l</pre><p>Command to view crontab entries of a specific user:</p><pre>crontab -u username -l</pre><p><strong>Crontab Special String</strong></p><p>Other than the above syntax we discussed, we can also use eight special strings provided by Crontab. It will not only save us time but will also improve readability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*L-E3rcvlcqmiMqS9zsdwqA.png" /></figure><p><strong>Crontab Guru</strong></p><p><a href="https://crontab.guru/">Crontab Guru</a> is a simple online cron schedule expression editor. In addition, it provides a useful means of monitoring your cronjob. All we need to do is copy a command provided and append at the end of the crontab definition. In case cron job fails or doesn’t even start, you will receive an alert email.</p><p>In the below example, Job will execute at 04:05, every day, every month and every week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M2YosKLZstKxtHlS.png" /></figure><p><strong>Conclusion:</strong><br>Mastering cronjobs is a powerful skill for system administrators and anyone seeking to automate repetitive tasks. With the flexibility and precision they offer, cronjobs contribute significantly to the efficiency and reliability of Unix-based systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b9e0b778ed4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unix/Linux — The vi Editor]]></title>
            <link>https://medium.com/@dhanushv/unix-linux-the-vi-editor-f3354d0ef810?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3354d0ef810</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[technology-trends]]></category>
            <category><![CDATA[shell-script]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Sat, 25 Nov 2023 12:34:32 GMT</pubDate>
            <atom:updated>2023-12-05T12:44:01.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unix/Linux — The vi Editor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3wDHG4g-tj-cSHUyU382xA.jpeg" /></figure><p>In my previous posts, I had explained Unix/Linux commands and shell scripting —</p><ul><li><a href="https://medium.com/@dhanushv/unix-linux-4ea128ebb985">Unix and Linux: A Tale of Open Source Empowerment</a></li><li><a href="https://medium.com/@dhanushv/unix-linux-commands-b168d7490227">Navigating the Command Line: A Comprehensive Guide to Unix and Linux Commands</a></li><li><a href="https://medium.com/@dhanushv/shell-scripting-explained-5a2f9ed2143b">Unleashing the Power of Shell Scripting</a></li></ul><p>In this post, let’s explore how the vi Editor works in Unix. There are many ways to edit files in Unix. Editing files using the screen-oriented text editor <strong>vi</strong> is one of the best ways. This editor enables you to edit lines in context with other lines in the file.</p><p>An improved version of the vi editor which is called the <strong>VIM</strong> has also been made available now. Here, VIM stands for <strong>Vi IM</strong>proved.</p><p>vi is generally considered the de facto standard in Unix editors because −</p><ul><li>It’s usually available on all the flavors of Unix system.</li><li>Its implementations are very similar across the board.</li><li>It requires very few resources.</li><li>It is more user-friendly than other editors such as the <strong>ed</strong> or the <strong>ex</strong>.</li></ul><p>You can use the <strong>vi</strong> editor to edit an existing file or to create a new file from scratch. You can also use this editor to just read a text file.</p><h3>Starting the vi Editor</h3><p>The following table lists out the basic commands to use the vi editor −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6HdRmP6TcdEz_0TPwWScg.png" /></figure><p>Following is an example to create a new file <strong>testfile</strong> if it already does not exist in the current working directory −</p><pre>$vi testfile</pre><p>The above command will generate the following output −</p><pre>|<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>~<br>&quot;testfile&quot; [New File]</pre><p>You will notice a <strong>tilde</strong> (~) on each line following the cursor. A tilde represents an unused line. If a line does not begin with a tilde and appears to be blank, there is a space, tab, newline, or some other non-viewable character present.</p><p>You now have one open file to start working on. Before proceeding further, let us understand a few important concepts.</p><h3>Operation Modes</h3><p>While working with the vi editor, we usually come across the following two modes −</p><ul><li><strong>Command mode</strong> − This mode enables you to perform administrative tasks such as saving the files, executing the commands, moving the cursor, cutting (yanking) and pasting the lines or words, as well as finding and replacing. In this mode, whatever you type is interpreted as a command.</li><li><strong>Insert mode</strong> − This mode enables you to insert text into the file. Everything that’s typed in this mode is interpreted as input and placed in the file.</li></ul><p>vi always starts in the <strong>command mode</strong>. To enter text, you must be in the insert mode for which simply type <strong>i</strong>. To come out of the insert mode, press the <strong>Esc</strong> key, which will take you back to the command mode.</p><p><strong>Hint</strong> − If you are not sure which mode you are in, press the Esc key twice; this will take you to the command mode. You open a file using the vi editor. Start by typing some characters and then come to the command mode to understand the difference.</p><h3>Getting Out of vi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*EmRe937GvNWe5gK7wK4N1g.png" /></figure><h3>Moving within a File</h3><p>To move around within a file without affecting your text, you must be in the command mode (press Esc twice). The following table lists out a few commands you can use to move around one character at a time −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*OelJPnEEtklA-S4u6oI0fQ.png" /></figure><p>The following points need to be considered to move within a file −</p><ul><li>vi is case-sensitive. You need to pay attention to capitalization when using the commands.</li><li>Most commands in vi can be prefaced by the number of times you want the action to occur. For example, <strong>2j</strong> moves the cursor two lines down the cursor location.</li></ul><p>There are many other ways to move within a file in vi. Remember that you must be in the command mode (<strong>press Esc twice</strong>).</p><h3>Editing Files</h3><p>To edit the file, you need to be in the insert mode. There are many ways to enter the insert mode from the command mode −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*CpwnUlKf7MqA8GvX5lHWMg.png" /></figure><h3>Deleting Characters</h3><p>Here is a list of important commands, which can be used to delete characters and lines in an open file −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*RB6YGlfEtw2ndRPhNm92Lw.png" /></figure><p>As mentioned above, most commands in vi can be prefaced by the number of times you want the action to occur. For example, <strong>2x</strong> deletes two characters under the cursor location and <strong>2dd</strong> deletes two lines the cursor is on.</p><h3>Change Commands</h3><p>You also have the capability to change characters, words, or lines in vi without deleting them. Here are the relevant commands −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*BoneX_trqLm5g72_wwWG7A.png" /></figure><h3>Copy and Paste Commands</h3><p>You can copy lines or words from one place and then you can paste them at another place using the following commands −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*Ey7ermODXdk74KgiAKobjQ.png" /></figure><h3>Word and Character Searching</h3><p>The vi editor has two kinds of searches: <strong>string</strong> and <strong>character</strong>. For a string search, the <strong>/</strong> and <strong>?</strong> commands are used. When you start these commands, the command just typed will be shown on the last line of the screen, where you type the particular string to look for.</p><p>These two commands differ only in the direction where the search takes place −</p><ul><li>The <strong>/</strong> command searches forwards (downwards) in the file.</li><li>The <strong>?</strong> command searches backwards (upwards) in the file.</li></ul><p>The <strong>n</strong> and <strong>N</strong> commands repeat the previous search command in the same or the opposite direction, respectively. Some characters have special meanings. These characters must be preceded by a backslash (<strong>\</strong>) to be included as part of the search expression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*KeQj84Qyu2mGXNnlKmQ10Q.png" /></figure><p>This helps see the ‘<strong>&lt;</strong>’ character description above.</p><p>The character search searches within one line to find a character entered after the command. The <strong>f</strong> and <strong>F</strong> commands search for a character on the current line only. <strong>f</strong> searches forwards and <strong>F</strong> searches backwards and the cursor moves to the position of the found character.</p><p>The <strong>t</strong> and <strong>T</strong> commands search for a character on the current line only, but for <strong>t</strong>, the cursor moves to the position before the character, and <strong>T</strong> searches the line backwards to the position after the character.</p><h3>Set Commands</h3><p>You can change the look and feel of your vi screen using the following <strong>:set</strong> commands. Once you are in the command mode, type <strong>:set</strong> followed by any of the following commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*fTyP1eJ1H-gKuYfQKvox9g.png" /></figure><h3>Running Commands</h3><p>The vi has the capability to run commands from within the editor. To run a command, you only need to go to the command mode and type <strong>:!</strong> command.</p><p>For example, if you want to check whether a file exists before you try to save your file with that filename, you can type <strong>:! ls</strong> and you will see the output of <strong>ls</strong> on the screen.</p><p>You can press any key (or the command’s escape sequence) to return to your vi session.</p><h3>Replacing Text</h3><p>The substitution command (<strong>:s/</strong>) enables you to quickly replace words or groups of words within your files. Following is the syntax to replace text −</p><pre>:s/search/replace/g</pre><p>The <strong>g</strong> stands for globally. The result of this command is that all occurrences on the cursor’s line are changed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3354d0ef810" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleashing the Power of Shell Scripting]]></title>
            <link>https://medium.com/@dhanushv/shell-scripting-explained-5a2f9ed2143b?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a2f9ed2143b</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Sat, 25 Nov 2023 11:56:01 GMT</pubDate>
            <atom:updated>2023-12-05T12:38:07.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*joDBu9fgIY-zenAS.png" /></figure><p>I had explained about Unix/Linux and their commands in my previous posts —</p><ul><li><a href="https://medium.com/@dhanushv/unix-linux-4ea128ebb985">Unix and Linux: A Tale of Open Source Empowerment</a></li><li><a href="https://medium.com/@dhanushv/unix-linux-commands-b168d7490227">Navigating the Command Line: A Comprehensive Guide to Unix and Linux Commands</a></li></ul><p>Let’s discover the world of shell and shell scripting in this post.</p><h3>What is Shell?</h3><p><strong>Shell </strong>is a command line interpreter. It is an interface between user and kernel. Shell provides users with an interface and accepts human-readable commands into the system and executes those commands which can run automatically and give the program’s output in a shell script.</p><p>An Operating is made of many components, but its two prime components are</p><ul><li>Kernel</li><li>Shell</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*9V0yOi5JdwvGArpY.png" /></figure><h3>Types of Shell</h3><p>There are two main shells in Linux:</p><p><strong>1</strong>. The <strong>Bourne Shell</strong>: The prompt for this shell is $ and its derivatives are listed below:</p><ul><li>POSIX shell also is known as sh</li><li>Korn Shell also knew as sh</li><li><strong>B</strong>ourne <strong>A</strong>gain <strong>SH</strong>ell also knew as bash (most popular)</li></ul><p><strong>2.</strong> <strong>The C shell</strong>: The prompt for this shell is %, and its subcategories are:</p><ul><li>C shell also is known as csh</li><li>Tops C shell also is known as tcsh</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*dPVjvjjTfokR1qK9unYNpA.png" /></figure><h3><strong>Shell Scripting</strong></h3><p><strong>Shell Scripting</strong> is an open-source computer program designed to be run by the Unix/Linux shell. Shell Scripting is a program to write a series of commands for the shell to execute. It can combine lengthy and repetitive sequences of commands into a single and simple script that can be stored and executed anytime which, reduces programming efforts.</p><ul><li>/bin/bash and /bin/sh is interactive shell</li><li>/sbin/nologin shell is non-interactive shell</li></ul><p>A shell script has syntax just like any other programming language. If you have any prior experience with any programming language like Python, C/C++ etc. It would be very easy to get started with it.</p><p>A shell script comprises the following elements –</p><ul><li>Shell Keywords — if, else, break etc.</li><li>Shell commands — cd, ls, echo, pwd, touch etc.</li><li>Functions</li><li>Control flow — if..then..else, case and shell loops etc.</li></ul><h3>Why do we need shell scripts?</h3><p>There are many reasons to write shell scripts:</p><ul><li>To avoid repetitive work and automation</li><li>System admins use shell scripting for routine backups.</li><li>System monitoring</li><li>Adding new functionality to the shell etc.</li></ul><h3>Some Advantages of shell scripts</h3><ul><li>The command and syntax are exactly the same as those directly entered in the command line, so programmers do not need to switch to entirely different syntax</li><li>Writing shell scripts are much quicker</li><li>Quick start</li><li>Interactive debugging etc.</li></ul><h3>Some Disadvantages of shell scripts</h3><ul><li>Prone to costly errors, a single mistake can change the command which might be harmful.</li><li>Slow execution speed</li><li>Design flaws within the language syntax or implementation</li><li>Not well suited for large and complex task</li><li>Provide minimal data structure unlike other scripting languages. etc.</li></ul><h3>How to determine Shell</h3><p>You can get the name of your shell prompt, with following command :</p><pre>$ echo $SHELL</pre><p>The $ sign stands for a shell variable, echo will return the text whatever you typed in.</p><h3>Let’s write our first script</h3><pre>#!/bin/bash<br>echo &quot;My First Script!&quot;</pre><p>To run it,</p><pre>$ chmod +x script.sh<br>$ ./script.sh</pre><h3>Shebang</h3><p>You might have noticed in above script that it starts with #!/bin/bash This is called shebang. It is basically to refer the path to the interpreter. There are many interpreters, some of them are: bash, zsh, csh and ksh, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*bYXMEZoRS0-8AnLy.png" /></figure><p>All the best people in life seem to like LINUX. — Steve Wozniak</p><p>To use bash: #!/bin/bash<br>To use zsh: #!/bin/zsh<br>To use ksh: #!/bin/ksh<br>To use csh: #!/bin/csh</p><p><strong>Why Shebang?<br></strong># is often called sharp and ! is called Bang, hence the name sharp bang, but generally people say it <strong>shebang</strong> instead of sharp bang.</p><p><strong>Note* </strong>If a script does not contain the shebang, the commands are executed using your shell, so there are chances that the code might run properly, but still, that isn’t the correct way of doing it!</p><p><strong>Comments<br></strong>Comments are started by a # sign, anything after pound sign on that line is ignored.</p><h3>Operations</h3><p>In shell scripting, to perform arithmetic operations we need to use <strong>double parenthesis</strong> (( )) which is used for <strong>arithmetic expansion</strong> on integers. The <strong>double parenthesis</strong> (( )) is also called a unary operator.</p><pre>#!/bin/bash</pre><pre>n1=10<br>n2=5</pre><pre>echo &quot;Sum of two numbers: &quot;$(($n1+$n2)) # Addition<br>echo &quot;Sub of two numbers: &quot;$(($n1-$n2)) # Substraction<br>echo &quot;Mul of two numbers: &quot;$(($n1*$n2)) # Mulitplication<br>echo &quot;Div of two numbers: &quot;$(($n1/$n2)) # Division<br>echo &quot;Modulus of two numbers: &quot;$(($n1%$n2)) # Modulus</pre><p>We can also use test command to work with arithmetic and string operations which provide more flexibility along with unary operators.</p><p>OPERATORS:</p><ol><li>Arhmetic operators</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*kGkRu1N22AnmmOQYWrNCCw.png" /></figure><p>2. Relational operators</p><p>a.Numeric comparision operators</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*E_mc1yQe5J0M6z2nWoWwiQ.png" /></figure><p>b.String comparision operators</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCqBS9JQAzPoYuv1Rane2Q.png" /></figure><p>3. Logical operators</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJDVNsRywyyf04jjfogl6A.png" /></figure><h3>Conditionals</h3><p>In shell scripting, [[ ]] or test command can be used for evaluating conditional expressions. Below are certain unary operators that can be used for testing the conditions</p><h3>Conditions</h3><ul><li>[[ -z STRING ]] - Empty string</li><li>[[ -n STRING ]] - Not empty string</li><li>[[ STRING == STRING ]] - Equal</li><li>[[ STRING != STRING ]] - Not equal</li><li>[[ NUM -eq NUM ]] - Equal</li><li>[[ NUM -ne NUM ]] - Not equal</li><li>[[ NUM -lt NUM ]] - Less than</li><li>[[ NUM -le NUM ]] - Less than or equal</li><li>[[ NUM -gt NUM ]] - Greater than</li><li>[[ NUM -ge NUM ]] - Greater than or equal</li><li>[[ ! EXPR ]] - Not</li><li>[[ X &amp;&amp; Y ]] - And</li><li>[[ X || Y ]] - Or</li></ul><h3>File Conditions</h3><ul><li>[[ -e FILE ]] - Exists</li><li>[[ -r FILE ]] - Readable</li><li>[[ -h FILE ]] - Symbolic link</li><li>[[ -d FILE ]] - Directory</li><li>[[ -w FILE ]] - Writable file</li><li>[[ -s FILE ]] - File size is &gt; 0 bytes</li><li>[[ -f FILE ]] - File</li><li>[[ -x FILE ]] - Executable file</li></ul><pre>#!/bin/bash</pre><pre>a=10<br>b=20<br># less than using square brackets<br>if [[ $a -lt $b ]]<br>then<br>   echo &quot;a is less than b&quot;<br>else<br>   echo &quot;a is not less than b&quot;<br>fi<br># less than using test command<br>if test &quot;$a&quot; -lt &quot;$b&quot;<br>then<br>   echo &quot;a is less than b&quot;<br>else<br>   echo &quot;a is not less than b&quot;<br>fi</pre><h3>Loops</h3><h3>if else</h3><p>if else loop is a conditional statement that allows executing different commands based on the condition true/false. Here square brackets [[ ]] are used to evaluate a condition.</p><p>Let’s create a file named ifelse.sh and input the below code</p><pre>#!/bin/bash</pre><pre># -e stands for exists<br>if [[ -e ./ifelse.sh ]]<br>then<br>  echo &quot;File exists&quot;<br>else<br>  echo &quot;File does not exist&quot;<br>fi</pre><h3>elif</h3><p>elif is a combination of both else and if. It is used to create multiple conditional statements and it must be always used in conjunction with if else statement</p><pre>#!/bin/bash</pre><pre>read -p &quot;Enter the number between 1 to 3: &quot; number<br>if [[ $number -eq 1 ]]<br>then<br>        echo &quot;The number entered is 1&quot;<br>elif [[ $number -eq 2 ]]<br>then<br>        echo &quot;The number entered is 2&quot;<br>elif [[ $number -eq 3 ]]<br>then<br>        echo &quot;The number entered is 3&quot;<br>else<br>        echo &quot;Invalid Number&quot;<br>fi</pre><h3>for</h3><p>The for loop is used to iterate over a sequence of values and below is the syntax</p><pre>#!/bin/bash</pre><pre>for i in {1..10}<br>do<br>  echo &quot;Val: $i&quot;<br>done<br># C style/Old Style of for loop<br>for((i=0;i&lt;=10;i++))<br>do<br>  echo &quot;Val: $i&quot;<br>done</pre><h3>while</h3><p>The while loop is used to execute a set of commands repeatedly as long as a certain condition is true. The loop continues until the condition is false.</p><pre>#!/bin/bash</pre><pre>count=0<br>while [ $count -lt 5 ]<br>do<br>  echo $count<br>  count=$(($count+1))<br>done</pre><h3>until</h3><p>The until loop in shell scripting is used to execute a block of code repeatedly until a certain condition is met.</p><pre>#!/bin/bash</pre><pre>count=1<br>until [ $count -gt 5 ]<br>do<br>    echo $count<br>    count=$(($count+1))<br>done</pre><h3>Break Statement</h3><p>break is a keyword. It is a control statement that is used to exit out of a loop ( for, while, or until) when a certain condition is met. It means that the control of the program is transferred outside the loop and resumes with the next set of lines in the script</p><pre>#!/bin/bash</pre><pre>count=1<br>while true<br>do<br>  echo &quot;Count is $count&quot;<br>  count=$(($count+1))<br>  if [ $count -gt 5 ]; then<br>    echo &quot;Break statement reached&quot;<br>    break<br>  fi<br>done</pre><h3>Continue statement</h3><p>continue is a keyword that is used inside loops (such as for, while, and until) to skip the current iteration of the loop and move on to the next iteration. It means that when the continue keyword is encountered while executing a loop the next set of lines in that loop will not be executed and moves to the next iteration.</p><pre>#!/bin/bash</pre><pre>for i in {1..10}<br>do<br>  if [ $i -eq 5 ]<br>  then<br>    continue<br>  fi<br>  echo $i<br>done</pre><h3>Functions</h3><p>Functions are a block of code which can be used again and again for doing a specific task thus providing code reusability.</p><h3>Normal Function</h3><pre>#!/bin/bash</pre><pre>sum(){<br>        echo &quot;The numbers are: $n1 $n2&quot;<br>        sum_val=$(($n1+$n2))<br>        echo &quot;Sum: $sum_val&quot;<br>}<br>n1=$1<br>n2=$2<br>sum</pre><h3>Function with return values</h3><p>To access the return value of the function we need to use $? to access that value</p><pre>#!/bin/bash</pre><pre>sum(){<br>        echo &quot;The numbers are: $n1 $n2&quot;<br>        sum_val=$(($n1+$n2))<br>        echo &quot;Sum: $sum_val&quot;<br>        return $sum_val<br>}<br>n1=$1<br>n2=$2<br>sum<br>echo &quot;Retuned value from function is $?&quot;</pre><h3>Variables</h3><p>The variable is a <strong>placeholder</strong> for saving a value which can be later accessed using that name. There are two types of variable</p><ul><li>Global - Variable defined outside a function which can be accessed throughout the script</li><li>Local - Variable defined inside a function and can be accessed only within it</li></ul><pre>#!/bin/bash</pre><pre># x &amp; y are global variables<br>x=10<br>y=20<br>sum(){<br>        sum=$(($x+$y))<br>        echo &quot;Global Variable Addition: $sum&quot;<br>}<br>sum<br>sub(){<br>        # a &amp; b are local variables<br>        local a=20<br>        local b=10<br>        local sub=$(($a-$b))<br>        echo &quot;Local Variable Substraction: $sub&quot;<br>}<br>sub</pre><h3>Arrays</h3><p>An array is a variable that can hold multiple values under a single name</p><ul><li>${arrayVarName[@]} - displays all the values of the array.</li><li>${#arrayVarName[@]} - displays the lenght of the array.</li><li>${arrayVarName[0]} - displays the first element of the array</li><li>${arrayVarName[-1]} - displays the last element of the array</li><li>unset arrayVarName[2] - deletes the 2 element</li></ul><pre>#!/bin/bash</pre><pre># Declare an array of fruits<br>fruits=(&quot;apple&quot; &quot;banana&quot; &quot;orange&quot; &quot;guava&quot;)</pre><pre># Print the entire array<br>echo &quot;All fruits using @ symbol: ${fruits[@]}&quot;<br>echo &quot;All fruits using * symbol: ${fruits[*]}&quot;</pre><pre># Print the third element of the array<br>echo &quot;Third fruit: ${fruits[2]}&quot;</pre><h3>Argument Passing</h3><p>We can pass arguments that can be used inside the scripts when it is executed. Those arguments can be accessed by the script using special variables like $1 $2 $3 etc.</p><ul><li>$0 - returns the file name of the shell script.</li><li>$@ - returns all arguments passed from cli.</li><li>$# - returns the no of arguments passed from cli.</li></ul><p>Let’s say we have a script file named argument_passing.sh and let&#39;s pass 2 arguments to it.</p><pre>argument_passing.sh &quot;Dhanush&quot; &quot;Software Engineer&quot;</pre><pre>#!/bin/bash</pre><pre># gives the filename of the script itself<br>echo &quot;FileName Argument: &quot;$0 # argument_passing.sh<br><br># gives the first argument passed<br>echo &quot;First Argument: &quot;$1 # Dhanush<br><br># gives the second argument passed<br>echo &quot;Second Argument: &quot;$2 # Software Engineer<br><br># displays all arguments passed<br>echo &quot;All Arguments: &quot;$@ # Dhanush Software Engineer<br><br># displays number of arguments passed<br>echo &quot;No of Arguments: &quot;$# # 2</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a2f9ed2143b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Command Line: A Comprehensive Guide to Unix and Linux Commands]]></title>
            <link>https://medium.com/@dhanushv/unix-linux-commands-b168d7490227?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/b168d7490227</guid>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[commands]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Fri, 24 Nov 2023 07:35:23 GMT</pubDate>
            <atom:updated>2023-12-05T12:36:44.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*StcIbUw0DsxqNISgJ1RvVA.jpeg" /></figure><p>I had explained about Unix/Linux in my previous post-</p><p><a href="https://medium.com/@dhanushv/unix-linux-4ea128ebb985">Unix and Linux: A Tale of Open Source Empowerment</a></p><p>Let’s go through important commands, tips and tricks to master Unix/Linux in this post.</p><h3>Linux Directory Commands</h3><p><strong>1. pwd Command</strong></p><p>The pwd command is used to display the location of the current working directory.</p><p><strong>Syntax:</strong></p><pre>pwd  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*wbg3Rw34tceCV1gh.png" /></figure><p><strong>2. mkdir Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-mkdir">mkdir</a> command is used to create a new directory under any directory.</p><p><strong>Syntax:</strong></p><pre>mkdir</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*z1RlSNtER69dGiBh.png" /></figure><p><strong>3. rmdir Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-rmdir">rmdir</a> command is used to delete a directory.</p><p><strong>Syntax:</strong></p><pre>rmdir</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*GuUlSqHw_VFk_OTZ.png" /></figure><p><strong>4. ls Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-ls">ls</a> command is used to display a list of content of a directory.</p><p><strong>Syntax:</strong></p><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*hq5lpj8zm26cQQY2.png" /></figure><p><strong>5. cd Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cd">cd</a> command is used to change the current directory.</p><p><strong>Syntax:</strong></p><pre>cd &lt;directory name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*q93AoCH55M_zIV8z.png" /></figure><h3>Linux File commands</h3><p><strong>6. touch Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-touch">touch</a> command is used to create empty files. We can create multiple empty files by executing it once.</p><p><strong>Syntax:</strong></p><pre>touch &lt;file name&gt;  <br>touch &lt;file1&gt;  &lt;file2&gt; ....  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*d7p1yfBg5CeVSBBh.png" /></figure><p><strong>7. cat Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cat">cat</a> command is a multi-purpose utility in the Linux system. It can be used to create a file, display content of the file, copy the content of one file to another file, and more.</p><p><strong>Syntax:</strong></p><pre>cat [OPTION]... [FILE]..  </pre><p>To create a file, execute it as follows:</p><pre>cat &gt; &lt;file name&gt;  <br>// Enter file content  </pre><p>Press “<strong>CTRL+ D</strong>” keys to save the file. To display the content of the file, execute it as follows:</p><pre>cat &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*zBrJCdoUQVoqqdPJ.png" /></figure><p><strong>8. rm Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-rm">rm</a> command is used to remove a file.</p><p><strong>Syntax:</strong></p><pre>rm &lt;file name&gt;</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*8GcTO4YKLVjX-Lbi.png" /></figure><p><strong>9. cp Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cp">cp</a> command is used to copy a file or directory.</p><p><strong>Syntax:</strong></p><pre>cp &lt;existing file name&gt; &lt;new file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*YwuG52fGSrvYRg27.png" /></figure><p><strong>10. mv Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-mv">mv</a> command is used to move a file or a directory form one location to another location.</p><p><strong>Syntax:</strong></p><pre>mv &lt;file name&gt; &lt;directory path&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*mnMxhDX0RFiRRBKZ.png" /></figure><p><strong>11. rename Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-rename">rename</a> command is used to rename files. It is useful for renaming a large group of files.</p><p><strong>Syntax:</strong></p><pre>rename &#39;s/old-name/new-name/&#39; files  </pre><p>For example, to convert all the text files into pdf files, execute the below command:</p><pre>rename &#39;s/\.txt$/\.pdf/&#39; *.txt  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/0*5Fn70ZdjYhdqZE_e.png" /></figure><p><strong>12. chmod command</strong></p><p>The<strong> </strong><a href="https://www.hostinger.in/tutorials/vps/change-linux-permissions-and-owners"><strong>chmod</strong></a> command modifies directory or file permissions in Linux. Here’s the basic syntax:</p><pre>chmod [option] [permission] [file_name]</pre><p>In Linux, each file is associated with three user classes — <strong>owner</strong>, <strong>group member</strong>, and <strong>others</strong>. It also has three permissions — <strong>read</strong>, <strong>write</strong>, and <strong>execute</strong>. If an owner wants to grant all permissions to every user, the command looks like this:</p><pre>chmod -rwxrwxrwx note.txt</pre><p><strong>13. chown command</strong></p><p>The <a href="https://www.hostinger.in/tutorials/linux-chown-command/"><strong>chown</strong></a> command lets you change a file, directory, or symbolic link’s ownership to the specified username. Here’s the syntax:</p><pre>chown [option] owner[:group] file(s)</pre><p>For example, to make <strong>linuxuser2 </strong>the owner of <strong>filename.txt</strong>, use:</p><pre>chown linuxuser2 filename.txt</pre><h3>Linux File Content Commands</h3><p><strong>14. head Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-head">head</a> command is used to display the content of a file. It displays the first 10 lines of a file.</p><p><strong>Syntax:</strong></p><pre>head &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*0hqlcjhniIMqx13E.png" /></figure><p><strong>15. tail Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-tail">tail</a> command is similar to the head command. The difference between both commands is that it displays the last ten lines of the file content. It is useful for reading the error message.</p><p><strong>Syntax:</strong></p><pre>tail &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/0*6a4KcL0CaCi-vPGi.png" /></figure><p><strong>16. tac Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-tac">tac</a> command is the reverse of cat command, as its name specified. It displays the file content in reverse order (from the last line).</p><p><strong>Syntax:</strong></p><pre>tac &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*fgKEeaykMQcnu3P2.png" /></figure><h3>Linux User Commands</h3><p><strong>17. su Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-su-commands">su</a> command provides administrative access to another user. In other words, it allows access of the Linux shell to another user.</p><p><strong>Syntax:</strong></p><pre>su &lt;user name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/0*wxIGzEpJVfp5z7Sk.png" /></figure><p><strong>18. id Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-id-command">id</a> command is used to display the user ID (UID) and group ID (GID).</p><p><strong>Syntax:</strong></p><pre>id  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*4QxQVTlhP3nOd1kD.png" /></figure><p><strong>19. useradd Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-create-user">useradd</a> command is used to add or remove a user on a Linux server.</p><p><strong>Syntax:</strong></p><pre>useradd  username  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*wLNHopOz4URbygjP.png" /></figure><p><strong>20. passwd Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-user-password">passwd</a> command is used to create and change the password for a user.</p><p><strong>Syntax:</strong></p><pre>passwd &lt;username&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*zo9xrlKdR4E3tGvu.png" /></figure><p><strong>21. groupadd Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-add-user-to-group">groupadd</a> command is used to create a user group.</p><p><strong>Syntax:</strong></p><pre>groupadd &lt;group name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/0*7c-7JVLMAKzIJOa4.png" /></figure><h3>Linux Filter Commands</h3><p><strong>22. cat Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cat-filters">cat</a> command is also used as a filter. To filter a file, it is used inside pipes.</p><p><strong>Syntax:</strong></p><pre>cat &lt;fileName&gt; | cat or tac | cat or tac |. . .   </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*ubNTdX2poOVwaJJN.png" /></figure><p><strong>23. cut Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cut">cut</a> command is used to select a specific column of a file. The ‘-d’ option is used as a delimiter, and it can be a space (‘ ‘), a slash (/), a hyphen (-), or anything else. And, the ‘-f’ option is used to specify a column number.</p><p><strong>Syntax:</strong></p><pre>cut -d(delimiter) -f(columnNumber) &lt;fileName&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*ng128s0-bfTSY-XF.png" /></figure><p><strong>24. grep Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-grep">grep</a> is the most powerful and used filter in a Linux system. The ‘grep’ stands for “<strong>global regular expression print</strong>.” It is useful for searching the content from a file. Generally, it is used with the pipe.</p><p><strong>Syntax:</strong></p><pre>command | grep &lt;searchWord&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/0*S0CdWLQQWLWBOkoi.png" /></figure><p><strong>25. comm Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-comm">‘comm’</a> command is used to compare two files or streams. By default, it displays three columns, first displays non-matching items of the first file, second indicates the non-matching item of the second file, and the third column displays the matching items of both files.</p><p><strong>Syntax:</strong></p><pre>comm &lt;file1&gt; &lt;file2&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*9TZLfu_QfdQ6S5B3.png" /></figure><p><strong>26. sed command</strong></p><p>The <a href="https://www.javatpoint.com/linux-sed">sed</a> command is also known as <strong>stream editor</strong>. It is used to edit files using a regular expression. It does not permanently edit files; instead, the edited content remains only on display. It does not affect the actual file.</p><p><strong>Syntax:</strong></p><pre>command | sed &#39;s/&lt;oldWord&gt;/&lt;newWord&gt;/&#39;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/0*unDo2eKOs0AWeU8M.png" /></figure><p><strong>27. tee command</strong></p><p>The <a href="https://www.javatpoint.com/linux-tee">tee</a> command is quite similar to the cat command. The only difference between both filters is that it puts standard input on standard output and also write them into a file.</p><p><strong>Syntax:</strong></p><pre>cat &lt;fileName&gt; | tee &lt;newFile&gt; |  cat or tac |.....  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*DiVsFfVP6PCSM6zS.png" /></figure><p><strong>28. tr Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-tr">tr</a> command is used to translate the file content like from lower case to upper case.</p><p><strong>Syntax:</strong></p><pre>command | tr &lt;&#39;old&#39;&gt; &lt;&#39;new&#39;&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/0*Vob9AodOJlJoi_lP.png" /></figure><p><strong>29. uniq Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-uniq">uniq</a> command is used to form a sorted list in which every word will occur only once.</p><p><strong>Syntax:</strong></p><pre>command &lt;fileName&gt; | uniq  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/0*wQ3NZzsTl8arzwUF.png" /></figure><p><strong>30. wc Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-wc">wc</a> command is used to count the lines, words, and characters in a file.</p><p><strong>Syntax:</strong></p><pre>wc &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*UMio30k-dg7EY4QB.png" /></figure><p><strong>31. od Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-od">od</a> command is used to display the content of a file in different formats, such as hexadecimal, octal, and ASCII characters.</p><p><strong>Syntax:</strong></p><pre>od -b &lt;fileName&gt;      // Octal format  <br>od -t x1 &lt;fileName&gt;   // Hexa decimal format  <br>od -c &lt;fileName&gt;     // ASCII character format  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*Q_ZO_2QdZvhHgnHC.png" /></figure><p><strong>32. sort Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-sort">sort</a> command is used to sort files in alphabetical order.</p><p><strong>Syntax:</strong></p><pre>sort &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/0*buguawM4SDPBx_fv.png" /></figure><p><strong>33. gzip Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-gzip">gzip</a> command is used to truncate the file size. It is a compressing tool. It replaces the original file by the compressed file having ‘.gz’ extension.</p><p><strong>Syntax:</strong></p><pre>gzip &lt;file1&gt; &lt;file2&gt; &lt;file3&gt;...  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*tYa5Qwiv3WtPCebC.png" /></figure><p><strong>34. gunzip Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-gzip">gunzip</a> command is used to decompress a file. It is a reverse operation of gzip command.</p><p><strong>Syntax:</strong></p><pre>gunzip &lt;file1&gt; &lt;file2&gt; &lt;file3&gt;. .  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*tHP4lQiEevNji64o.png" /></figure><h3>Linux Utility Commands</h3><p><strong>35. find Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-find">find</a> command is used to find a particular file within a directory. It also supports various options to find a file such as byname, by type, by date, and more.</p><p>The following symbols are used after the find command:</p><p>(.) : For current directory name</p><p>(/) : For root</p><p><strong>Syntax:</strong></p><pre>find . -name &quot;*.pdf&quot;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/0*IwJoh33wpBu4Tn4r.png" /></figure><p><strong>36. locate Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-locate">locate</a> command is used to search a file by file name. It is quite similar to find command; the difference is that it is a background process. It searches the file in the database, whereas the find command searches in the file system. It is faster than the find command. To find the file with the locates command, keep your database updated.</p><p><strong>Syntax:</strong></p><pre>locate &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/0*wkf8MZmAZxNQZ2rN.png" /></figure><p><strong>37. date Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-date">date</a> command is used to display date, time, time zone, and more.</p><p><strong>Syntax:</strong></p><pre>date  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/0*9C310TX6ATH2Fk7R.png" /></figure><p><strong>38. cal Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-cal">cal</a> command is used to display the current month’s calendar with the current date highlighted.</p><p><strong>Syntax:</strong></p><pre>cal</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/0*q7yM40N4nrK0_WWV.png" /></figure><p><strong>39. sleep Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-sleep">sleep</a> command is used to hold the terminal by the specified amount of time. By default, it takes time in seconds.</p><p><strong>Syntax:</strong></p><pre>sleep &lt;time&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/0*_SR-jEZTDld2ZY-O.png" /></figure><p><strong>40. time Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-time">time</a> command is used to display the time to execute a command.</p><p><strong>Syntax:</strong></p><pre>time  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/0*fW2tr24AY2HnLwHS.png" /></figure><p><strong>41. zcat Command</strong></p><p>The zcat command is used to display the compressed files.</p><p><strong>Syntax:</strong></p><pre>zcat &lt;file name&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/0*b53dB7YMlEs9Hnqk.png" /></figure><p><strong>42. df Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-df">df</a> command is used to display the disk space used in the file system. It displays the output as in the number of used blocks, available blocks, and the mounted directory.</p><p><strong>Syntax:</strong></p><pre>df</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*lshOEEXRFo4m4JHb.png" /></figure><p><strong>43. du command</strong></p><p>Use <strong>du </strong>to check a file or directory’s storage consumption. Remember to specify the directory path when using this command, for example:</p><pre>du /home/user/Documents</pre><p>The <strong>du </strong>command has several options, such as:</p><ul><li><strong>-s — </strong>shows the specified folder’s total size.</li><li><strong>-m — </strong>provides folder and file information in <strong>MB.</strong></li><li><strong>-k</strong> — displays information in <strong>KB</strong>.</li><li><strong>-h — </strong>informs the displayed folders and files’ last modification date.</li></ul><p><strong>44. mount Command</strong></p><p>The <a href="https://www.javatpoint.com/linux-mount">mount</a> command is used to connect an external device file system to the system’s file system.</p><p><strong>Syntax:</strong></p><pre>mount -t type &lt;device&gt; &lt;directory&gt;  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/0*9KGHsHt2Wq4ehFtf.png" /></figure><p><strong>45. exit Command</strong></p><p>Linux <a href="https://javatpoint.com/linux-exit-command">exit</a> command is used to exit from the current shell. It takes a parameter as a number and exits the shell with a return of status number.</p><p><strong>Syntax:</strong></p><pre>exit</pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/0*VdOcrxySRMfELOfn.png" /></figure><p>After pressing the ENTER key, it will exit the terminal.</p><p><strong>46. clear Command</strong></p><p>Linux <strong>clear</strong> command is used to clear the terminal screen.</p><p><strong>Syntax:</strong></p><pre>clear  </pre><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*UYAdRjjBbl3tOGM1.png" /></figure><p>After pressing the ENTER key, it will clear the terminal screen.</p><p><strong>47. history command</strong></p><p>Enter <strong>history</strong> to list previously executed commands. It lets you reuse the commands without rewriting them. To use it, enter this syntax with sudo privileges:</p><pre>history [option]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*6xi7QIoYR1xp3p0x.png" /></figure><p>To rerun a specific utility, enter an exclamation mark (<strong>!</strong>) followed by the command’s list number. For example, use the following to rerun the <strong>255th</strong> command:</p><pre>!255</pre><p>This command supports many options, such as:</p><ul><li><strong>-c</strong> — clears the history list.</li><li><strong>-d</strong> <strong>offset — </strong>deletes the history entry at the <strong>OFFSET </strong>position.</li><li><strong>-a</strong> — appends history lines.</li></ul><p><strong>48. man command</strong></p><p>The <strong>man </strong>command provides a user manual of any Linux Terminal utilities, including their names, descriptions, and options. It consists of nine sections:</p><ul><li>Executable programs or shell commands</li><li>System calls</li><li>Library calls</li><li>Games</li><li>Special files</li><li>File formats and conventions</li><li>System administration commands</li><li>Kernel routines</li><li>Miscellaneous</li></ul><p>Here’s the command syntax:</p><pre>man [option] [section_number] command_name</pre><p>If you only use the command name as the parameter, Terminal displays the full user manual. Here’s an example command to query section <strong>1</strong> of the <strong>ls </strong>command manual:</p><pre>man 1 ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*8uI46rKdlLG6qf3D.png" /></figure><p><strong>49. echo command</strong></p><p>The <strong>echo </strong>command displays a line of text as a standard output. Here’s the basic command syntax:</p><pre>echo [option] [string]</pre><p>For example, you can display <strong>Hostinger Tutorials </strong>by entering:</p><pre>echo &quot;Hostinger Tutorials&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*0tJIJVsVHFljZfkQ.png" /></figure><p>This command supports many options, such as:</p><ul><li><strong>-n</strong> — displays the output without the trailing newline.</li><li><strong>-e — </strong>enables the interpretation of the following backslash escapes:</li><li><strong>\b — </strong>removes spaces in between a text.</li><li><strong>\c</strong> — produces no further output.</li></ul><p><strong>50. apt-get command</strong></p><p><strong>apt-get</strong> is a command line tool for handling Advanced Package Tool (APT) libraries in Debian-based Linux, like Ubuntu. It requires <strong>sudo</strong> or <strong>root </strong>privileges.</p><p>This Linux command lets you manage, update, remove, and install software, including its dependencies. Here’s the main syntax:</p><pre>apt-get [options] (command)</pre><p>These are the most common commands to use with <strong>apt-get</strong>:</p><ul><li><strong>update — </strong>synchronizes the package files from their sources.</li><li><strong>upgrade — </strong>installs the latest version of all installed packages.</li><li><strong>check </strong>— updates the package cache and checks broken dependencies.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/0*zkW7A2D8vqfXmpeY.png" /></figure><h3>File Permissions</h3><p>All the three owners (user owner, group, others) in the Linux system have three types of permissions defined. Nine characters denotes the three types of permissions.</p><ol><li><strong>Read (r) :</strong> The read permission allows you to open and read the content of a file. But you can’t do any editing or modification in the file.</li><li><strong>Write (w) :</strong> The write permission allows you to edit, remove or rename a file. For instance, if a file is present in a directory, and write permission is set on the file but not on the directory, then you can edit the content of the file but can’t remove, or rename it.</li><li><strong>Execute (x):</strong> In Unix type system, you can’t run or execute a program unless execute permission is set.But in Windows, there is no such permission available.</li></ol><p><strong>Permissions are listed below:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hM5eYGIg7tovDaqgO8PEVw.png" /></figure><h3>Permission Set</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*j7qz5lah2GL_Y_bGGIepiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*WI2xm1cehdEIGGTU.png" /></figure><p>Look at the above snapshot, there are ten characters (-rw-rw-r — ) before the user owner. We’ll describe these ten characters here.</p><p><strong>File permissions for (-rw-rw-r — )</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZvmHoSx5740ImhIEplzNjQ.png" /></figure><p>When you are the <strong>User owner</strong>, then the user owner permission applies to you. Other permissions are not relevant to you.</p><p>When you are the <strong>Group</strong> then the group permission applies to you. Other permissions are not relevant to you.</p><p>When you are the<strong> Other,</strong> then the other permission applies to you. User and group permissions are not relevant to you.</p><p><strong>Permission Example</strong></p><p>Now we will see some examples how permissions can be seen for a file or directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*FtqzH0QKdCglejzR.png" /></figure><p>Look at the above snapshot, different directories and files have different permissions.</p><p>First letter (-) or <strong>d</strong> represents the files and directories respectively.</p><p>Now, from remaining nine letters,<strong> first</strong> triplet represents the permission for <strong>user owner.</strong> Second triplet represents the permission for <strong>group owner. Third</strong> triplet represents the permission for<strong> other</strong> .</p><h3>Setting Octal Permissions</h3><p>Octal permissions can also be set for the groups.</p><p>For example, to set<strong> r</strong> octal will be<strong> 4,</strong> to set<strong> w</strong> octal will be<strong> 2,</strong> to set<strong> x</strong> octal will be<strong> 1.</strong></p><p><strong>Octal Table:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOfWvHqkVXsZ4Aj7c-O-8A.png" /></figure><p>From this we can conclude that,</p><pre>777 = rwxrwxrwx<br>765 = rwxrw-r-x<br>654 = rw-r-xr -</pre><p>and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*xwmo8UKGyebEpZeh.png" /></figure><p>Look at the above snapshot, we have shown some random octal examples with the numbers <strong>777, 274</strong> and <strong>111.</strong></p><h3>GREP command</h3><p>The grep filter searches a file for a particular pattern of characters, and displays all lines that contain that pattern. The pattern that is searched in the file is referred to as the regular expression (grep stands for globally search for regular expression and print out).</p><pre>$ grep [options] pattern [files]Options Description<br>-c : This prints only a count of the lines that match a pattern<br>-h : Display the matched lines, but do not display the filenames.<br>-i : Ignores, case for matching<br>-l : Displays list of a filenames only.<br>-n : Display the matched lines and their line numbers.<br>-v : This prints out all the lines that do not matches the pattern<br>-e exp : Specifies expression with this option. Can use multiple times.<br>-f file : Takes patterns from file, one per line.<br>-E : Treats pattern as an extended regular expression (ERE)<br>-w : Match whole word<br>-o : Print only the matched parts of a matching line,<br> with each such part on a separate output line.-A n : Prints searched line and nlines after the result.<br>-B n : Prints searched line and n line before the result.<br>-C n : Prints searched line and n lines after before the result.</pre><h3>Linux Commands Tips and Tricks</h3><p>Here are some tips for using Linux commands and Terminal to improve your system management efficiency:</p><ul><li>Add the <strong>–help</strong> option to list the full usage of a command.</li><li>Use the <strong>exit </strong>command to close Terminal.</li><li>Enter the <strong>clear </strong>command to clean the Terminal screen.</li><li>Press the <strong>Tab </strong>button to autofill after entering a command with an argument.</li><li>Use <strong>Ctrl + C</strong> to terminate a running command.</li><li>Press <strong>Ctrl + Z</strong> to pause a working command.</li><li>Use <strong>Ctrl + A</strong> to move to the beginning of the line.</li><li>Press <strong>Ctrl + E </strong>to bring you to the end of the line.</li><li>Separate multiple commands using <strong>semicolons </strong>(<strong>;</strong>) or <strong>double ampersands</strong> (<strong>&amp;&amp;</strong>).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b168d7490227" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unix and Linux: A Tale of Open Source Empowerment]]></title>
            <link>https://medium.com/@dhanushv/unix-linux-4ea128ebb985?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ea128ebb985</guid>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[operating-systems]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 13:02:23 GMT</pubDate>
            <atom:updated>2025-04-10T07:32:51.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOw_UkS8R-KktXpc3cUkVw.png" /></figure><p>We would have used or come across tech terminolgies Unix and Linux and we know that they are operating systems. We also know that they are <a href="https://medium.com/@dhanushv/introducing-open-source-software-59b9bfea8579">open-source</a> and they have many distros. But, the question we should ask is why do we still need them?</p><p>To understand this question we must know basic details about them such as,</p><h3><strong>1. What are Unix &amp; Linux?</strong></h3><p>Unix is an open source operating system (OS) that directly manages a system’s hardware and resources, like CPU, memory, and storage. It is a set of programs that act as a link between the computer and the user. Whereas, Linux is a kernel — the core of an operating system that manages hardware and software resources, acting as an interface between them.</p><p>They make use of comand line interface (CLI).</p><p>Unix stands for UNiplexed Information Computing System.</p><p>Linux stands for Lovable Intellect Not Using XP and it is a clone of Unix, but doesn’t contain code of Unix.</p><h3><strong>2. Features of Linux/Unix?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Yake1k4qQIsAMjle.png" /></figure><p>Here are some features of Unix:</p><ul><li><strong>Multitasking:</strong> Unix allows multiple programs to run simultaneously.</li><li><strong>Multi-user:</strong> Unix allows multiple users to share computer resources.</li><li><strong>Portability:</strong> Unix can run on many different systems.</li><li><strong>Hierarchical file system:</strong> Unix supports a hierarchical file system for easy maintenance.</li><li><strong>Software library:</strong> Unix has a large library of software.</li><li><strong>CLI:</strong> Unix has a powerful CLI.</li><li><strong>Networking:</strong> Unix has a wide range of networking capabilities.</li><li><strong>Simplicity:</strong> Unix is simple.</li></ul><p>Here are some features of Linux:</p><ul><li><strong>Open-source:</strong> Linux is free and open-source software.</li><li><strong>GUI:</strong> Linux has a graphical user interface.</li><li><strong>End-to-end encryption:</strong> Linux has end-to-end encryption.</li><li><strong>Keyboard configuration:</strong> Linux can configure keyboards into different languages.</li><li><strong>Updates:</strong> Linux has frequent updates.</li><li><strong>Infrastructure: </strong>Linux has a lightweight infrastructure.</li><li><strong>Multi-user support:</strong> Linux supports multiple users.</li><li><strong>Security:</strong> Linux is secure.</li><li><strong>Customizable:</strong> Linux is customizable.</li><li><strong>Live CD/USB:</strong> Almost all Linux distros provide live CD/USB so that users can run/try it without installing it.</li></ul><h3><strong>3. Architecture of Unix?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*jFMKGq1GVQHz9Sjv.jpg" /></figure><p>The main concept that unites all the versions of Unix are the following four basics −</p><ul><li><strong>Kernel</strong> − The kernel is the heart of the operating system. It interacts with the hardware and most of the tasks like memory management, task scheduling and file management.</li><li><strong>Shell</strong> − The shell is the utility that processes your requests. When you type in a command at your terminal, the shell interprets the command and calls the program that you want.</li><li><strong>Commands and Utilities</strong> − There are various commands and utilities which you can make use of in your day to day activities. <strong>cp</strong>, <strong>mv</strong>, <strong>cat</strong> and <strong>grep</strong>, etc. are few examples of commands and utilities. There are over 250 standard commands plus numerous others provided through 3rd party software. All the commands come along with various options.</li><li><strong>Files and Directories</strong> − All the data of Unix is organized into files. All files are then organized into directories. These directories are further organized into a tree-like structure called the <strong>filesystem</strong>.</li></ul><h3>4. What is CLI and GUI?</h3><p>CLI is a command line interface. This user interface enables the user to give commands to interact with the device.</p><p>GUI is a graphical user interface. This user interface enables users to interact with devices with the help of graphical icons and visual indicators.</p><h3>5. Why should we use CLI over GUI?</h3><ul><li>CLI gives better control to the user.</li><li>CLI is a best option for professionals who work on more programming languages.</li><li>It required less memory as compared to GUI.</li><li>The speed of the CLI is faster than GUI.</li></ul><h3><strong>6. Comparison</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*-AFzDjXbDIjWsvLeCB9h1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*8zxx46N0pgRZs8uLH7sHyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*zWmJUNy9qRPXZwip" /></figure><h3><strong>7. Conclusion</strong></h3><p>So, arriving back to our main question we can conclude —</p><ul><li>Unix Vs Windows:-</li></ul><p>Windows is a closed system without portability and limited programming facility. While it requires 12 MB of RAM for booting and has a single advantage of being user-friendly.</p><ul><li>Linux Vs Windows:-</li></ul><p>Windows is more expensive <strong>without</strong> free technical support, Kernel source code, Telnet server access, without X Window Server, C and C++ compilers and Perl 5.0. Although, Windows is famous for it’s GUI it has only one GUI, whereas Linux has 4 GUIs! Linux supports 32 file systems, whereas Windows supports only 3.</p><ul><li>Unix Vs Linux:-</li></ul><p>Linux is open-source and free to use, it is widely used in desktop, servers, smartphones to mainframes and provides variety of GUI, cheaper to install, provides more flexiblility and scalability. Unix is licensed, not open-source, widely used in workstations, servers and PCs, provides more stablity, portability, interoperability and security.</p><p>Hence, Unix/Linux are best suited for individuals with programming knowledge, whereas operating systems like Windows and MacOs don’t require users to have technical knowledge making it user friendly.</p><p>I hope I have provided an introductory idea about Unix/Linux. Stay tuned for my next post on Unix/Linux commands and Shell scripting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ea128ebb985" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Big Data?]]></title>
            <link>https://medium.com/@dhanushv/what-is-big-data-fdfc8dbdc7b0?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdfc8dbdc7b0</guid>
            <category><![CDATA[big-data-analytics]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 15:30:46 GMT</pubDate>
            <atom:updated>2023-01-19T15:30:46.857Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/0*xH6Px7rIrX6cpLth.jpg" /></figure><p>Have you ever heard the terminology “big data” and wondered what it is?</p><p><strong>What is Big Data?</strong></p><p>Big data is high volume, high velocity and high variety information that requires new forms of processing for enhanced decision making, insight discovery and process optimization.</p><p><strong>Need of Big Data</strong></p><p>The rise in technology has led to the production and storage of voluminous amounts of data. Earlier megabytes were used but nowadays petabytes are used for processing, analysis, discovering new facts and generating new knowledge. Conventional systems for storage, processing and analysis pose challenges in large growth in volume of data, variety of data, various forms and formats, increasing complexity, faster generation of data and need of quickly processing, analyzing and usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*kknciTCRgDKaucx5tiH_Xg.png" /><figcaption>Evolution of Big Data</figcaption></figure><p><strong>Types of Big Data</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*dorAtR6wv9z055LzDK60KQ.png" /><figcaption>Classification of Big Data</figcaption></figure><p>Big Data can be classified as</p><ul><li><strong>Structured</strong></li></ul><p>Structured data conform and associate with data schemas and data models. Structured data are found in tables (rows and columns). Nearly 15–20% data are in structured or semi-structured form.</p><ul><li><strong>Semi-Structured</strong></li></ul><p>Examples of semi-structured data are XML and JSON documents. Semi-structured data contain tags or other markers, which separate semantic elements and enforce hierarchies of records and fields within the data. Semi-structured form of data does not conform and associate with formal data model structures. Data do not associate data models, such as the relational database and table models.</p><ul><li><strong>Multi-Structured</strong></li></ul><p>Multi-structured data refers to data consisting of multiple formats of data, viz. structured, semi-structured and/or unstructured data. Multi-structured data sets can have many formats. They are found in non-transactional systems. For example, streaming data on customer interactions, data of multiple sensors, data at web or enterprise server or the data- warehouse data in multiple formats.</p><ul><li><strong>Unstructured</strong></li></ul><p>Data does not possess data features such as a table or a database. Unstructured data are found in file types such as .TXT, .CSV. Data may be as key-value pairs, such as hash key-value pairs. Data may have internal structures, such as in e- mails. The data do not reveal relationships, hierarchy relationships. The relationships, schema and features need to be separately established.</p><p>For example, Website content data: YouTube videos, browsing data, e-payments, web store data, user-generated maps</p><p><strong>Big Data Characteristics</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/0*bZIuI1O4pMe7WkdO.png" /><figcaption>Characteristics of Big Data</figcaption></figure><ul><li><strong>Volume:</strong> is related to size of the data hence the characteristic.</li><li><strong>Velocity:</strong> refers to the speed of generation of data.</li><li><strong>Variety:</strong> comprises of a variety of data.</li><li><strong>Veracity:</strong> quality of data captured, which can vary greatly, affecting its accurate analysis.</li></ul><p><strong>Big Data Applications</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6yPEhfuqV0YGkt3lbHF9yg.jpeg" /></figure><ul><li><strong>Smarter Healthcare</strong>: Making use of the petabytes of patient’s data, the organization can extract meaningful information and then build applications that can predict the patient’s deteriorating condition in advance.</li><li><strong>Telecom</strong>: Telecom sectors collects information, analyzes it and provide solutions to different problems. By using Big Data applications, telecom companies have been able to significantly reduce data packet loss, which occurs when networks are overloaded, and thus, providing a seamless connection to their customers.</li><li><strong>Retail</strong>: Retail has some of the tightest margins, and is one of the greatest beneficiaries of big data. The beauty of using big data in retail is to understand consumer behavior. Amazon’s recommendation engine provides suggestion based on the browsing history of the consumer.</li><li><strong>Traffic control</strong>: Traffic congestion is a major challenge for many cities globally. Effective use of data and sensors will be key to managing traffic better as cities become increasingly densely populated.</li><li><strong>Manufacturing</strong>: Analyzing big data in the manufacturing industry can reduce component defects, improve product quality, increase efficiency, and save time and money.</li><li><strong>Search Quality</strong>: Every time we are extracting information from google, we are simultaneously generating data for it. Google stores this data and uses it to improve its search quality.</li></ul><p>So, I hope this blog helped you get basic idea on <strong>Big Data</strong>.</p><p>Stay tuned for more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdfc8dbdc7b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Classification vs Clustering]]></title>
            <link>https://medium.com/@dhanushv/classification-vs-clustering-508cedcae32a?source=rss-b3c02937fd13------2</link>
            <guid isPermaLink="false">https://medium.com/p/508cedcae32a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Dhanush Vasudevaraju]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 14:20:47 GMT</pubDate>
            <atom:updated>2023-01-12T14:20:47.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*znqHVYHrS_VtLtdk.gif" /><figcaption>Classification vs Clustering</figcaption></figure><p>I had explained about A.I, A.I algorithms &amp; Regression vs Classification in my previous posts —</p><ul><li><a href="https://medium.com/@dhanushv/what-is-a-i-5a8415b703bb">What is A.I?</a></li><li><a href="https://medium.com/@dhanushv/a-i-algorithms-dde6e4e01c90">A.I Algorithms</a></li><li><a href="https://medium.com/@dhanushv/regression-vs-classification-e128ba5c5d69">Regression vs Classification</a></li></ul><p>Let’s see the difference between classification &amp; clustering in this post.</p><p>Clustering is an example of an unsupervised learning algorithm, in contrast to regression and classification, which are both examples of supervised learning algorithms. Data may be labeled via the process of classification, while instances of similar data can be grouped together through the process of clustering. If the variable of interest in the output is consistent, then we have a regression problem.</p><h3>What Is Classification?</h3><p>Classification is an example of a directed machine learning approach. The classification techniques provide assistance in making predictions about the category of the target values based on any input that is provided. There are many different kinds of classifications, such as binary classification and multi-class classification, amongst others. It is dependent on how many classes are included inside the target values.</p><h3>Types of Classification Algorithms</h3><ul><li>Logistic Regression</li><li>K-Nearest Neighbors (KNN)</li><li>Decision Trees</li><li>Random Forest</li><li>Naïve Bayes</li><li>Support Vector Machine</li></ul><h3>Applications</h3><ul><li>Detection of unsolicited email</li><li>Recognition of the face</li><li>Determining whether or not a client is likely to leave</li><li>Approval of a Bank Loan</li><li>Content classification</li><li>Biometric fingerprinting</li><li>Handwriting analysis</li><li>Speech acknowledgment</li></ul><h3>What Are the Different Classifiers and Applications of Classification?</h3><p>The method of classification is applied for assigning a label to each class which has been generated as a result of classifying the available data into a predetermined number of categories. Two kinds of classifiers exist:</p><ul><li><strong>Binary Classifier:-</strong> In this instance, the categorization is carried out using just two potential results, which correspond to two separate classes. Consider, for example, the categorization of spam and non-spam email, and so on.</li><li><strong>Multi-Class Classifier:-</strong> The categorization is carried out using more than just two unique classes in this instance. Categorization of the many kinds of soil, segmentation of musical genres, etc., are all examples.</li></ul><h3>What Is Clustering?</h3><p>Clustering is an example of an algorithm that belongs to the category of unsupervised machine learning. Its purpose is to create clusters out of collections of data points that have certain properties. In an ideal scenario, the data points that belong to a certain cluster must have similar characteristics, whilst the data points that belong to other clusters must be as distinct from one another as is humanly possible. Soft clustering and hard clustering are the two categories that make up the overall concept of clustering.</p><h3>Types Of Clustering Algorithms</h3><ul><li><strong>K-Means Clustering:-</strong> It begins by establishing a fixed set of k segments and then using distance metrics to compute the distance that separates each data item from the cluster centers of the various segments. It then places each data point into each of the k groups according to how far apart it is from the other points.</li><li><strong>Agglomerative Hierarchical Clustering:-</strong> A cluster is formed by merging data points based on distance metrics and the criteria used to connect these clusters.</li><li><strong>Divisive Hierarchical Clustering:-</strong> It begins with all of the data sets combined into a single cluster and then divides those data sets using the proximity metric together with the criterion. Both hierarchical clustering and contentious clustering methods may be seen as a dendrogram, which can also be used to determine the optimal number of clusters.</li><li><strong>DBSCAN:-</strong> This approach of clustering is one that is based on density. Some algorithms, such as K-Means, perform well on clusters that have a reasonable amount of space between them and produce clusters that have a spherical shape. DBSCAN is used when the input is in an arbitrary form, although it is less susceptible to aberrations than other scanning techniques. It brings together the data sets that are adjacent to a large number of other data sets within a given radius.</li><li><strong>OPTICS:-</strong> Density-based clustering, like DBSCAN, uses this strategy, but it takes a few more factors into account. In comparison to DBSCAN however, it has a greater computational burden. A reachability plot is also created, but it doesn’t break the data sets into clusters. This may aid with the understanding of clustering.</li><li><strong>BIRCH:-</strong> In order to organize the data into groups, it first generates a summary of it. First, it summarizes the data, and then it utilizes that summation to form clusters. However, it is limited to just working with numerical properties that can be expressed spatially.</li></ul><h3>Applications</h3><ul><li>Market segmentation is based on customer preferences</li><li>An investigation of the social networks that exist</li><li>Segmentation of an image</li><li>Recommendation Engines</li><li>Engines that make suggestions</li><li>Customer and market segmentation</li><li>The study of social networks (SNA)</li><li>Clustering of search results</li><li>Analysis of biological data</li><li>Analysis of x-rays in medicine</li><li>Detecting the presence of cancer cells</li></ul><h3>What Are the Different Methods</h3><p>One may say that a collection of items that belong to the same class constitutes a cluster. To put it more simply, we may define a cluster as a collection of items that share certain characteristics with one another. In the field of machine learning, the process of analysis known as clustering is considered to be very essential.</p><h3>Different Methods of Clustering</h3><ul><li>Clustering based on partitioning</li><li>Clustering based on a hierarchical model</li><li>Clustering based on density</li><li>Clustering on a grid</li><li>Clustering based on a model</li></ul><h3>The Difference Between Classification vs Clustering</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*znqHVYHrS_VtLtdk.gif" /><figcaption>Classification vs Clustering</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*3uKVVTleWcUKr8Ad.png" /></figure><p>So, I hope this blog post will help you differentiate between classification &amp; clustering.</p><p>Stay tuned for more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=508cedcae32a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>