<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Raveen Kumar</title>
    <link>https://raveenkumar.com/tags/linux/</link>
    <description>Recent content in Linux on Raveen Kumar</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Raveen Kumar</copyright>
    <lastBuildDate>Fri, 12 May 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://raveenkumar.com/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>fc fix command or fix previous command</title>
      <link>https://raveenkumar.com/posts/2023-05-12-fc-fix-command-or-fix-previous-command/</link>
      <pubDate>Fri, 12 May 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-05-12-fc-fix-command-or-fix-previous-command/</guid>
      <description>&lt;p&gt;In Bash, &lt;code&gt;fc&lt;/code&gt; stands for &amp;ldquo;fix command&amp;rdquo; and it is a built-in command that allows you to work with the command history. The &lt;code&gt;fc&lt;/code&gt; command provides a way to view, edit, and re-execute commands from your command history.&lt;/p&gt;&#xA;&lt;p&gt;Here are some common uses of the &lt;code&gt;fc&lt;/code&gt; command:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Viewing command history&lt;/strong&gt;: You can use &lt;code&gt;fc -l&lt;/code&gt; or simply &lt;code&gt;fc&lt;/code&gt; to display the list of recently executed commands. By default, it shows the most recent commands with line numbers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Grep for files that does not contain a specific string</title>
      <link>https://raveenkumar.com/posts/2023-05-09-grep-for-files-that-does-not-contain-a-specific-string/</link>
      <pubDate>Tue, 09 May 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-05-09-grep-for-files-that-does-not-contain-a-specific-string/</guid>
      <description>&lt;p&gt;Another useful way to use grep is for printing file names that do not contain a specific string, for example&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grep -L &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;string&amp;#34;&lt;/span&gt; *&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can use the &lt;code&gt;-L&lt;/code&gt; option of the &lt;code&gt;grep&lt;/code&gt; command, which prints the names of all files that do not contain the specified search string.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;*&lt;/code&gt; at the end tells &lt;code&gt;grep&lt;/code&gt; to search all files in the current directory. If you want to search only specific files or directories, you can replace the &lt;code&gt;*&lt;/code&gt; with the filenames or directory names.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Periodically run a program and watch the output</title>
      <link>https://raveenkumar.com/posts/2023-05-05-periodically-run-a-program-and-watch-the-output/</link>
      <pubDate>Fri, 05 May 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-05-05-periodically-run-a-program-and-watch-the-output/</guid>
      <description>&lt;h2 id=&#34;watch&#34;&gt;watch&lt;/h2&gt;&#xA;&lt;p&gt;Execute a program periodically, showing output fullscreen&lt;/p&gt;&#xA;&lt;p&gt;Example&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;watch ls&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;alternative - &lt;code&gt;viddy&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Horizontally print file contents</title>
      <link>https://raveenkumar.com/posts/2023-05-03-horizontally-print-file-contents/</link>
      <pubDate>Wed, 03 May 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-05-03-horizontally-print-file-contents/</guid>
      <description>&lt;p&gt;To concatenate the contents of a vertical file horizontally in Unix, you can use the &lt;code&gt;paste&lt;/code&gt; command with the &lt;code&gt;-s&lt;/code&gt; option.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s an example:&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s say you have a file &lt;code&gt;file.txt&lt;/code&gt; with the following vertical content:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apple&#xA;banana&#xA;orange&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can concatenate the contents horizontally using the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;paste -s file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will produce the output:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apple   banana  orange&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;-s&lt;/code&gt; option tells &lt;code&gt;paste&lt;/code&gt; to concatenate the lines horizontally instead of vertically. By default, &lt;code&gt;paste&lt;/code&gt; separates the columns with a tab character. If you want to use a different separator, you can specify it with the &lt;code&gt;-d&lt;/code&gt; option followed by the separator character. For example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>rsync is weird, does not sync &#34;tags&#34; directory</title>
      <link>https://raveenkumar.com/posts/2023-02-24-rsync-is-weird/</link>
      <pubDate>Fri, 24 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-02-24-rsync-is-weird/</guid>
      <description>&lt;p&gt;For whatever reason rsync decided not to sync &lt;code&gt;tags&lt;/code&gt; directory since it is ignored in CVS mode. Took a lot time to figure out the problem. Finally this command works correctly.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;&lt;code&gt;--include&lt;/code&gt;&lt;/em&gt; used to sync everything, despite ofthe cvs option, -C. But removed in this command.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;rsync -av --delete --checksum --copy-links -rPuzhi ./public/ root@raveenkumar.xyz:/var/www/raveenkumar/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Programming</title>
      <link>https://raveenkumar.com/library/programming/</link>
      <pubDate>Sun, 19 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/</guid>
      <description></description>
    </item>
    <item>
      <title>AWK</title>
      <link>https://raveenkumar.com/library/programming/awk/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/awk/</guid>
      <description>&lt;h2 id=&#34;example-1&#34;&gt;Example 1&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;awk -F &#39;,&#39; &#39;{print $NF}&#39; {{filename}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To print only rows with columns matching a specific string&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;awk &#39;$3 == &amp;quot;hello&amp;quot;&#39; file&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This will match with,&#xA;&lt;code&gt;1 2 hello something&lt;/code&gt;&#xA;but not with,&#xA;&lt;code&gt;1 2 world something&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;example-2-awking-and-cutting-some-stuff&#34;&gt;Example 2: Awking and cutting some stuff&lt;/h2&gt;&#xA;&lt;p&gt;Lets assume that you want to print the 1st and 3rd field in one line.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;echo &amp;quot;A:B:C:D:E:F:G&amp;quot; | awk -F &#39;:&#39; &#39;ORS=&amp;quot; &amp;quot; {print $1} {print $3}&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Here ORS stands for, The output record separator, by default its a newline.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cat</title>
      <link>https://raveenkumar.com/library/programming/cat/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cat/</guid>
      <description>&lt;h2 id=&#34;join-multimedia-files&#34;&gt;Join multimedia files&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat movie.mpeg.0* &amp;gt; movie.mpeg&#xA;cat *mp3 &amp;gt; combined.mp3&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>cp</title>
      <link>https://raveenkumar.com/library/programming/cp/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cp/</guid>
      <description>&lt;h2 id=&#34;dereference--follow-and-copy-symbolic-links&#34;&gt;Dereference / follow and copy symbolic links&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;cp -L source dest&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;copy-only-file-that-do-not-exist-in-the-destination-directory---update&#34;&gt;COPY ONLY FILE THAT DO NOT EXIST IN THE DESTINATION DIRECTORY - UPDATE&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;cp -u *.html destination&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cut</title>
      <link>https://raveenkumar.com/library/programming/cut/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/cut/</guid>
      <description>&lt;h2 id=&#34;cut-from-25th-column&#34;&gt;Cut from 25th column&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/316785/is-there-a-diff-utility-that-allows-you-to-exclude-columns&#34;&gt;https://superuser.com/questions/316785/is-there-a-diff-utility-that-allows-you-to-exclude-columns&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cut -c25- file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;cut-fields&#34;&gt;Cut fields&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;echo &amp;quot;1:2:3&amp;quot; | cut -d &amp;quot;:&amp;quot; -f 1&#xA;&#xA;1&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>du</title>
      <link>https://raveenkumar.com/library/programming/du/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/du/</guid>
      <description>&lt;h2 id=&#34;find-size-of-all-files-and-directories-under-current-directory-and-sort-it-based-on-size&#34;&gt;Find size of all files and directories under current directory and sort it based on size&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;du -sh * | sort -h&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Locate</title>
      <link>https://raveenkumar.com/library/programming/locate/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/locate/</guid>
      <description>&lt;h2 id=&#34;description&#34;&gt;Description&lt;/h2&gt;&#xA;&lt;p&gt;Locate is a alternative to find for files.&#xA;Locate uses &lt;code&gt;updatedb&lt;/code&gt; command to update its database.&#xA;Note that we must run the &lt;code&gt;updatedb&lt;/code&gt; command everytime there is file&#xA;system change.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;h3 id=&#34;create-a-database&#34;&gt;Create a database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files&#34;&gt;Locate files&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate filename&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;create-a-database-locally&#34;&gt;Create a database locally&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb_path=&amp;quot;$HOME/.local/locate_db&amp;quot;&#xA;updatedb_home=&amp;quot;$updatedb_path/home.db&amp;quot;&#xA;updatedb -l 0 -o &amp;quot;$updatedb_home&amp;quot; -U ~/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files-for-locally-created-database&#34;&gt;Locate files for locally created database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate -d &amp;quot;$updatedb_home&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>pandoc</title>
      <link>https://raveenkumar.com/library/programming/pandoc/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/pandoc/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://pandoc.org/MANUAL.html&#34;&gt;https://pandoc.org/MANUAL.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pandoc -o output.html input.txt&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Sed</title>
      <link>https://raveenkumar.com/library/programming/sed/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/sed/</guid>
      <description>&lt;h2 id=&#34;to-replace-text&#34;&gt;To replace text&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;sed &#39;s/text/replacement_text/g&#39; &amp;lt;file_name&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-replace-text-and-write-file&#34;&gt;To replace text and write file&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;sed -i &#39;s/text/replacement_text/g&#39; &amp;lt;file_name&amp;gt;&lt;/code&gt; ** Append to beginning&#xA;of a file sed -i &amp;lsquo;1i text&amp;rsquo; file.txt * &lt;a href=&#34;https://raveenkumar.com/library/programming/linux/&#34;&gt;back&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;find-and-replace-a-specific-line-from-all-files-in-current-directory-matching-a-specific-extension&#34;&gt;Find and replace a specific line from all files in current directory matching a specific extension&lt;/h2&gt;&#xA;&lt;p&gt;Here, all .md files have&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;a id=&amp;#34;org55550fd&amp;#34;&amp;gt;&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Line in it. The following command deletes those lines from all the files.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -iname &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*.md&amp;#34;&lt;/span&gt; -exec sed -i &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/&amp;lt;a id=*/d&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\;&lt;/span&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>TMUX</title>
      <link>https://raveenkumar.com/library/programming/tmux/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/tmux/</guid>
      <description>&lt;p&gt;The greatest samurai to ever exist?&lt;/p&gt;&#xA;&lt;h2 id=&#34;tmux-plugins&#34;&gt;TMUX plugins&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tpm&#34;&gt;GitHub - tmux-plugins/tpm: Tmux Plugin Manager&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tmux-urlview&#34;&gt;GitHub - tmux-plugins/tmux-urlview: Quickly open any url on your terminal window!&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/tmux-plugins/tmux-resurrect&#34;&gt;GitHub - tmux-plugins/tmux-resurrect: Persists tmux environment across system restarts.&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-move-a-pane-from-another-window-to-current-window&#34;&gt;To move a pane from another window to current window&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;join-pane -s target-window:target-pane&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;to-use-256-colours-in-tmux&#34;&gt;To use 256 colours in Tmux&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sanctum.geek.nz/arabesque/256-colour-terminals/#:~:text=To%20use%20256%20colours%20in%20Tmux%2C%20you%20should,colour231%20in%20your%20status%20lines%20and%20other%20configurations&#34;&gt;256 colours in TMUX&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You should set the default terminal in &lt;code&gt;.tmux.conf&lt;/code&gt; to be&#xA;screen-256color,&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;set -g default-terminal &amp;quot;screen-256color&amp;quot;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Windows WSL Notes</title>
      <link>https://raveenkumar.com/library/programming/windows-wsl/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/windows-wsl/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://thomasward.com/wsl2-x11/&#34;&gt;https://thomasward.com/wsl2-x11/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;change-password&#34;&gt;Change password&lt;/h2&gt;&#xA;&lt;h3 id=&#34;to-change-to-root-user&#34;&gt;To change to root user&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;ubuntu config --default-user root&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;to-change-password&#34;&gt;To change password&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;passwd, passwd &amp;lt;user_name&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;open-windows-gui-applications-with-linux-command-line&#34;&gt;Open Windows GUI applications with Linux command line&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;mspaint.exe file.png&#xA;notepad.exe file.txt&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://dev.to/adityakanekar/upgrading-from-wsl1-to-wsl2-1fl9&#34;&gt;https://dev.to/adityakanekar/upgrading-from-wsl1-to-wsl2-1fl9&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>bc</title>
      <link>https://raveenkumar.com/library/programming/bc/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/bc/</guid>
      <description>&lt;h2 id=&#34;bc-as-a-hex-calculator&#34;&gt;bc as a hex calculator&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;obase=16&#xA;ibase=16&#xA;9+1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;bc-fractional&#34;&gt;bc fractional&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;scale=10&#xA;1/3&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;evaluating-expressions-from-commandline&#34;&gt;Evaluating expressions from commandline&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;bc &amp;lt;&amp;lt;&amp;lt; &amp;quot;ibase=10; obase=16; $(grep cru_spare -r | awk -F &amp;quot;,&amp;quot; &#39;{print $NF}&#39;)&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>ctags</title>
      <link>https://raveenkumar.com/library/programming/ctags/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ctags/</guid>
      <description>&lt;h2 id=&#34;basics&#34;&gt;Basics&lt;/h2&gt;&#xA;&lt;p&gt;Ctags is a tool that makes it easy to navigate large source code projects. It provides some of the features that you may be used to using in Eclipse or other IDEs, such as the ability to jump from the current source file to definitions of functions and structures in other files.&lt;/p&gt;&#xA;&lt;p&gt;For full info refer this link, &lt;a href=&#34;https://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html&#34;&gt;https://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;commands&#34;&gt;Commands&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd $REPO_ROOT&#xA;ctags -R *&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In vim&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:! ctag -R *&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Add the tags file to vimrc&lt;/p&gt;</description>
    </item>
    <item>
      <title>Diff</title>
      <link>https://raveenkumar.com/library/programming/diff/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/diff/</guid>
      <description>&lt;h2 id=&#34;to-diff-2-files&#34;&gt;To diff 2 files&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;diff file1 file2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-diff-2-files-and-view-side-by-side&#34;&gt;To diff 2 files and view side by side&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;diff -y file1 file2&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Example pstree command</title>
      <link>https://raveenkumar.com/posts/2023-02-17-pstree/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-02-17-pstree/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pstree -u username -hp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>ImageMagick</title>
      <link>https://raveenkumar.com/library/programming/imagemagick-notes/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/imagemagick-notes/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Adding blur effect to images&lt;/strong&gt;&#xA;&lt;code&gt;convert input.jpg -blur 0x8 output.jpg&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Convert a series of images to gifs&lt;/strong&gt;&#xA;&lt;code&gt;convert -delay 100 -loop 0 image* animation.gif&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Less</title>
      <link>https://raveenkumar.com/library/programming/less/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/less/</guid>
      <description>&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;less filename&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;chop-long-lines-with-less&#34;&gt;Chop long lines with &lt;code&gt;less&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;less -S filename&lt;/code&gt;&#xA;Note that -S at the end doesnot work&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux notes general</title>
      <link>https://raveenkumar.com/library/programming/linux/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/linux/</guid>
      <description>&lt;h2 id=&#34;commands&#34;&gt;Commands&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;cat - contatenate&lt;/li&gt;&#xA;&lt;li&gt;tac - concatenate in reverse&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;column-command&#34;&gt;&lt;code&gt;column&lt;/code&gt; command&lt;/h2&gt;&#xA;&lt;p&gt;The column utility formats its input into multiple columns.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;printf &amp;quot;a:b:c\n1::3\n&amp;quot; | column -t -s &#39;:&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;table border=&#34;2&#34; cellspacing=&#34;0&#34; cellpadding=&#34;6&#34; rules=&#34;groups&#34; frame=&#34;hsides&#34;&gt;&#xA;&lt;colgroup&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-left&#34; /&gt;&#xA;&lt;/colgroup&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;a&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;b&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;c&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;1&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;3&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;&amp;#xa0;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Note that this output is different from one that is printed in terminal. Strange… Below is the terminal output.&lt;/p&gt;&#xA;&lt;table border=&#34;2&#34; cellspacing=&#34;0&#34; cellpadding=&#34;6&#34; rules=&#34;groups&#34; frame=&#34;hsides&#34;&gt;&#xA;&lt;colgroup&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;col  class=&#34;org-left&#34; /&gt;&#xA;&lt;col  class=&#34;org-right&#34; /&gt;&#xA;&lt;/colgroup&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;a&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;b&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;c&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;1&lt;/td&gt;&#xA;&lt;td class=&#34;org-left&#34;&gt;&amp;#xa0;&lt;/td&gt;&#xA;&lt;td class=&#34;org-right&#34;&gt;3&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;uuidgen-universal-unique-id-generator&#34;&gt;&lt;code&gt;uuidgen&lt;/code&gt; universal unique id generator&lt;/h2&gt;&#xA;&lt;p&gt;Generate unique ID&amp;rsquo;s&lt;/p&gt;&#xA;&lt;h2 id=&#34;script-records-terminal&#34;&gt;&lt;code&gt;script&lt;/code&gt; Records terminal&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;man script&#xA;man scriptreplay&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;script --timing=file.tm script.out&#xA;# Write some scripts&#xA;# Exit with `exit` or `^d`&#xA;scriptreplay --timing file.tm --typescript script.out&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;reset-recover-a-borked-terminal&#34;&gt;&lt;code&gt;reset&lt;/code&gt; Recover a borked terminal&lt;/h2&gt;&#xA;&lt;h2 id=&#34;count-number-of-files-in-a-directory&#34;&gt;Count number of files in a directory&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ls -1 | wc -l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;building-from-source&#34;&gt;Building from source&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;./configure&#xA;./configure --prefix=$path&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;redirections&#34;&gt;Redirections&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;2&amp;gt;&amp;amp;1&#xA;2&amp;gt;&amp;amp;1 &amp;gt; /dev/null&#xA;&amp;gt;&#xA;&amp;gt;/dev/null&#xA;&amp;gt;&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;keymaps&#34;&gt;Keymaps&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-c&#xA;Ctrl-d&#xA;Ctrl-l&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;cp&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/cp/&#34;&gt;cp&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;cut&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/cut/&#34;&gt;cut&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;less&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/less/&#34;&gt;less&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;linux&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/linux/&#34;&gt;linux&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;seq&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/seq/&#34;&gt;seq&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;paste&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/paste/&#34;&gt;paste&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;pstree&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/posts/2023-02-17-pstree/&#34;&gt;pstree&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;du&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/du/&#34;&gt;du&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;rsync&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/rsync/&#34;&gt;rsync&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;sed&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/sed/&#34;&gt;sed&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;ssh&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/ssh/&#34;&gt;ssh&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;vifm&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/text-editors/vifm/&#34;&gt;vifm&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;zip&#34;&gt;&lt;a href=&#34;https://raveenkumar.com/library/programming/zip/&#34;&gt;zip&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;readline&#34;&gt;Readline&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;C-x C-e&lt;/code&gt; to edit current commant in default text editor&lt;/li&gt;&#xA;&lt;li&gt;or &lt;code&gt;v&lt;/code&gt; in &lt;code&gt;vi&lt;/code&gt; mode&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ldd-print-shared-libraries&#34;&gt;&lt;code&gt;ldd&lt;/code&gt; Print shared libraries&lt;/h2&gt;&#xA;&lt;p&gt;This command can be used to find all the shared library or libraries of a program&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lockfile</title>
      <link>https://raveenkumar.com/library/programming/lockfile/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/lockfile/</guid>
      <description>&lt;h2 id=&#34;lockfile&#34;&gt;&lt;code&gt;lockfile&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;installation&#34;&gt;Installation&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo apt install procmail&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;description&#34;&gt;Description&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;man lockfile&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Suppose you want to make sure that access to the file &amp;ldquo;important&amp;rdquo; is&#xA;serialised, i.e., no more than one program or shell script should be&#xA;allowed to access it. For simplicity&amp;rsquo;s sake, let&amp;rsquo;s suppose that it is a&#xA;shell script. In this case you could solve it like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;...&#xA;lockfile important.lock&#xA;...&#xA;access_&amp;quot;important&amp;quot;_to_your_hearts_content&#xA;...&#xA;rm -f important.lock&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now if all the scripts that access &amp;ldquo;important&amp;rdquo; follow this guideline,&#xA;you will be assured that at most one script will be executing between&#xA;the &lt;code&gt;lockfile&lt;/code&gt; and the &lt;code&gt;rm&lt;/code&gt; commands.&lt;/p&gt;</description>
    </item>
    <item>
      <title>paste</title>
      <link>https://raveenkumar.com/library/programming/paste/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/paste/</guid>
      <description>&lt;h2 id=&#34;print-2-files-side-by-side&#34;&gt;print 2 files side by side&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;paste file1 file2&#xA;&#xA;-d {{delimiter}}&#xA;-d&#39;&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Ranger file manager</title>
      <link>https://raveenkumar.com/library/programming/ranger/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ranger/</guid>
      <description>&lt;p&gt;Managing files from commandline might be cumbersome time to&#xA;time. To make the job easy there are quit a lot of terminal curses&#xA;based file managers available like, ranger which uses Vi&#xA;keybindings.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install ranger-fm&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;usage&#34;&gt;usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;ranger&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;keybindings&#34;&gt;keybindings&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://ranger.github.io/cheatsheet.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;official-pages&#34;&gt;Official pages&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ranger.github.io/documentation.html&#34;&gt;https://ranger.github.io/documentation.html&lt;/a&gt;&#xA;&lt;a href=&#34;https://github.com/ranger/ranger&#34;&gt;https://github.com/ranger/ranger&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;tabbed-mode&#34;&gt;Tabbed mode&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-n&#xA;&amp;lt;Tab&amp;gt; key to switch between tabs&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;show-hidden-files&#34;&gt;&lt;a href=&#34;https://youtu.be/B5ISNwXwDcE&#34;&gt;Show hidden files&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Ctrl-h&#xA;zh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-cd-into-current-curectory-after-exit&#34;&gt;To cd into current curectory after exit&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/1043806/how-to-exit-the-ranger-file-explorer-back-to-command-prompt-but-keep-the-current&#34;&gt;https://superuser.com/questions/1043806/how-to-exit-the-ranger-file-explorer-back-to-command-prompt-but-keep-the-current&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;alias ranger=&#39;ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd &amp;quot;$LASTDIR&amp;quot;&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;open-multiple-files-in-vim-from-ranger&#34;&gt;Open Multiple files in vim from ranger&lt;/h2&gt;&#xA;&lt;p&gt;Select all the files with ranger&lt;/p&gt;</description>
    </item>
    <item>
      <title>rsync</title>
      <link>https://raveenkumar.com/library/programming/rsync/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/rsync/</guid>
      <description>&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;rsync -P source dest&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;this-is-the-command-that-i-used-for-syncing-this-website&#34;&gt;This is the command that I used for syncing this website&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;# For whatever reason rsync excludes tags directory, so --include used&#xA;rsync -av --delete --checksum --copy-links -rPuzhi ./public/ root@raveenkumar.xyz:/var/www/raveenkumar/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;example---directory-mirroring&#34;&gt;Example - Directory mirroring&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;rsync -PCahzvu --delete $ORIG_PATH/$ORIG_DIR $MIRROR_PATH/.&#xA;&#xA;-P -C: Skip revision control files&#xA;-a: Archive &#xA;-h: Human readable&#xA;-z: zip&#xA;-v: Verbose&#xA;-u: Update&#xA;--delete: Delete directories and files which  is present in mirror directory but not in original directory.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-exclude&#34;&gt;To exclude&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;--exclude=”\*/file.txt”&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux&#34;&gt;https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>seq</title>
      <link>https://raveenkumar.com/library/programming/seq/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/seq/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.compciv.org/topics/bash/variables-and-substitution/&#34;&gt;http://www.compciv.org/topics/bash/variables-and-substitution/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;seq 1 5&#xA;echo $(seq 1 5)&#xA;# Or, to create 5 new directories:&#xA;# mkdir $(seq 1 5)&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Slurm Job manager</title>
      <link>https://raveenkumar.com/library/programming/slurm---srun-job-manager/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/slurm---srun-job-manager/</guid>
      <description>&lt;p&gt;To allocate 4 CPU cores and 8 GB of RAM for an &lt;code&gt;emacs&lt;/code&gt; process using the &lt;code&gt;srun&lt;/code&gt; command, you can use the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;srun --cpus-per-task=4 --mem=8192 emacs&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;--cpus-per-task&lt;/code&gt; option specifies the number of CPU cores to allocate, and the &lt;code&gt;--mem&lt;/code&gt; option specifies the amount of memory in megabytes.&lt;/p&gt;&#xA;&lt;p&gt;To pass the &lt;code&gt;-nw&lt;/code&gt; argument to &lt;code&gt;emacs&lt;/code&gt; when using the &lt;code&gt;srun&lt;/code&gt; command, you can simply include it after the &lt;code&gt;emacs&lt;/code&gt; command in the &lt;code&gt;srun&lt;/code&gt; command line. For example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ssh</title>
      <link>https://raveenkumar.com/library/programming/ssh/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/ssh/</guid>
      <description>&lt;h2 id=&#34;cd-to-a-particular-dir-after-ssh&#34;&gt;Cd to a particular dir after ssh&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;$ ssh -t ostechnix@192.168.225.52 &#39;cd /home/ostechnix/dir1 ; bash&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-automatically-install-a-ssh-public-key-on-a-remote-machine&#34;&gt;To automatically install a ssh public key on a remote machine&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;ssh-copy-id -i ~/.ssh/id_rsa.pub $USER@$HOSTNAME&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-manually-install-a-ssh-public-key-on-a-remote-machine&#34;&gt;To manually install a ssh public key on a remote machine&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat ~/.ssh/id_rsa.pub; # copy the contents of the file; paste into ssh/authorized_keys file;&#xA;chmod 600 ~/.ssh/authorized_keys&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Tar</title>
      <link>https://raveenkumar.com/library/programming/tar-gunzip-gzip/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/tar-gunzip-gzip/</guid>
      <description>&lt;h2 id=&#34;untar&#34;&gt;Untar&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -xvf file.tar dir_ext&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;tar&#34;&gt;tar&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -cf file.tar&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;to-compress-with-gunzipgzip&#34;&gt;To compress with gunzip/gzip&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -xvfz file.tar dir_ext&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;gunzip--gzip&#34;&gt;Gunzip / gzip&lt;/h1&gt;&#xA;&lt;pre&gt;&lt;code&gt;cat file | gzip &amp;gt; file.gzip&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Unix find</title>
      <link>https://raveenkumar.com/library/programming/find/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/find/</guid>
      <description>&lt;h2 id=&#34;to-exclude-files-or-perform-reverse-match&#34;&gt;To exclude files or perform reverse match&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -not -iname &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;file&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;to-perform-regex-matching&#34;&gt;To perform regex matching&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -regex &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;.*file&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;to-find-and-print-only-symbolic-links-in-a-directory-and-its-subdirectories&#34;&gt;To find and print only symbolic links in a directory and its subdirectories&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;find . -type l -print&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bash</title>
      <link>https://raveenkumar.com/library/programming/bash/</link>
      <pubDate>Thu, 16 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/bash/</guid>
      <description>&lt;h2 id=&#34;bash&#34;&gt;Bash&lt;/h2&gt;&#xA;&lt;h2 id=&#34;reading-materials&#34;&gt;Reading materials&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://blog.yossarian.net/2020/01/23/Anybody-can-write-good-bash-with-a-little-effort&#34;&gt;https://blog.yossarian.net/2020/01/23/Anybody-can-write-good-bash-with-a-little-effort&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://will-keleher.com/posts/5-Useful-Bash-Patterns.html&#34;&gt;https://will-keleher.com/posts/5-Useful-Bash-Patterns.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://timvisee.com/blog/elegant-bash-conditionals&#34;&gt;https://timvisee.com/blog/elegant-bash-conditionals&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://srobb.net/shellscripting.html&#34;&gt;https://srobb.net/shellscripting.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://srobb.net/bashtips.html&#34;&gt;https://srobb.net/bashtips.html&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;select-statement&#34;&gt;Select statement&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; opt in y n; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;echo $opt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a loop where the user can select the option. Use case to break out of the loop.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; opt in y n; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;echo $opt selected&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;case&lt;/span&gt; $opt in&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;y&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;break &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;n&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;break &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;*&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;echo wrong option&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;esac&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;bash-variables&#34;&gt;Bash variables&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;$USER&#xA;$HOSTNAME&#xA;$PS1&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;to-find-or-list-all-environment-variables&#34;&gt;To Find or List all environment variables&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;env&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is useful when we want to manage the shell variables properly&lt;/p&gt;</description>
    </item>
    <item>
      <title>GNU Make Notes</title>
      <link>https://raveenkumar.com/library/programming/gnu-make/</link>
      <pubDate>Mon, 13 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/gnu-make/</guid>
      <description>&lt;h2 id=&#34;gnu-make-notes&#34;&gt;GNU Make notes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.cmcrossroads.com/article/basics-getting-environment-variables-gnu-make&#34;&gt;https://www.cmcrossroads.com/article/basics-getting-environment-variables-gnu-make&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;exit script with &lt;code&gt;exit 0&lt;/code&gt; or make will interpret it as error if there is no &lt;code&gt;0&lt;/code&gt; returned. Context below&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/15894675/make-error-1&#34;&gt;c - Make: *** [] Error 1 - Stack Overflow&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to shoot yourself in the foot</title>
      <link>https://raveenkumar.com/library/programming/how-to-shoot-yourself-in-the-foot/</link>
      <pubDate>Tue, 07 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/how-to-shoot-yourself-in-the-foot/</guid>
      <description>&lt;h2 id=&#34;how-to-shoot-yourself-in-the-foot&#34;&gt;How to shoot yourself in the foot&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Described below are several methods for shooting yourself in the foot using various programming techniques.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;br&gt;&#xA;You shoot yourself in the foot.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;C++&lt;/strong&gt;&lt;br&gt;&#xA;You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible since you can&amp;rsquo;t tell which are bitwise copies and which are just pointing at others and saying, &amp;ldquo;That&amp;rsquo;s me over there.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating windows 11 installation media from linux</title>
      <link>https://raveenkumar.com/posts/2022-09-20-create-windows-11-installation-media-from-linux/</link>
      <pubDate>Thu, 20 Oct 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-20-create-windows-11-installation-media-from-linux/</guid>
      <description>&lt;p&gt;Seems like creating windows 11 installation media is problematic without a windows os. Tried Balena Etcher, woeusb and Fedora media writer and were unable to produce bootable image.&lt;/p&gt;&#xA;&lt;p&gt;Now trying out ventoy.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ventoy.net/en/download.html&#34;&gt;https://ventoy.net/en/download.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Steps&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Install ventoy into an usb storage (Note install it as GPT and not MBR for obvious reasons, more storage size support, etc.)&lt;/li&gt;&#xA;&lt;li&gt;Copy downloaded iso file into ventoy usb partition&lt;/li&gt;&#xA;&lt;li&gt;You can copy any number of iso into this partition it seems&lt;/li&gt;&#xA;&lt;li&gt;Disable CSM support in motherboard bios&lt;/li&gt;&#xA;&lt;li&gt;Restart bios&lt;/li&gt;&#xA;&lt;li&gt;Enable Secure Boot in bios&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Secure Boot mode - Standard&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Restart bios&lt;/li&gt;&#xA;&lt;li&gt;There was a error for some reason, key error, I had to enroll the key into MOK database using the options provided&lt;/li&gt;&#xA;&lt;li&gt;Still it did not work, windows 11 installation reported that my system does not meet the requirements&lt;/li&gt;&#xA;&lt;li&gt;Now only step 4, and not step 6.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Disable CSM&lt;/li&gt;&#xA;&lt;li&gt;Disable secure boot&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;With this I was able to install&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t know why this has to be a pain in the butt.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to merge pdf file in command-line</title>
      <link>https://raveenkumar.com/posts/2022-10-19-how-to-merge-pdf-with-command-line/</link>
      <pubDate>Wed, 19 Oct 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-10-19-how-to-merge-pdf-with-command-line/</guid>
      <description>&lt;pre&gt;&lt;code&gt;pdfunite pdf1.pdf pdf2.pdf out.pdf&#xA;&#xA;pdfunite ~/my_repos/raveenkumar.xyz/Blog/linux_and_programming/vimrefcard.pdf ~/my_repos/raveenkumar.xyz/Blog/linux_and_programming/vimrefcard.pdf 2022-10-19-out.pdf&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>How to create and move windows and containers to workspaces on the fly in i3wm</title>
      <link>https://raveenkumar.com/posts/2022-09-30-create-and-move-windows-and-containers-to-workspaces-on-the-fly/</link>
      <pubDate>Fri, 30 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-30-create-and-move-windows-and-containers-to-workspaces-on-the-fly/</guid>
      <description>&lt;p&gt;I do not know why i3wm does not have this key-bind by default. But this piece of code solves it.&lt;/p&gt;&#xA;&lt;p&gt;This is the task that i want the i3wm to do,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Move window to any existing workspace&lt;/li&gt;&#xA;&lt;li&gt;If the input workspace does not exist create a new one and move the window to it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    set $custom_command [r]ename workspace [m]ove to workspace [c]reate workspace [q]uit&#xA;    bindsym $mod+c mode &amp;#34;$custom_command&amp;#34;&#xA;    &#xA;    mode &amp;#34;$custom_command&amp;#34; {&#xA;        bindsym r exec i3-input -F &amp;#39;rename workspace to &amp;#34;%s&amp;#34;&amp;#39; -P &amp;#39;New name: &amp;#39;; mode &amp;#34;default&amp;#34;&#xA;        bindsym m exec &amp;#34;bash ~/.scripts/move_window_to_existing_workspace.bash&amp;#34;&#xA;        bindsym c exec i3-input -F &amp;#39;workspace &amp;#34;%s&amp;#34;&amp;#39; -P &amp;#39;New Workspace name: &amp;#39;; mode &amp;#34;default&amp;#34;&#xA;    &#xA;        bindsym q mode &amp;#34;default&amp;#34;&#xA;    }&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;~/.scripts/move_window_to_existing_workspace.bash&lt;/code&gt; file contents&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to create qrcodes in command-line</title>
      <link>https://raveenkumar.com/posts/2022-09-30-how-to-create-qrcodes-in-command-line/</link>
      <pubDate>Fri, 30 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-30-how-to-create-qrcodes-in-command-line/</guid>
      <description>&lt;p&gt;Install &lt;code&gt;qrencode&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo dnf install qrencode&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Run the following command.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;qrencode -o &amp;quot;test.png&amp;quot; &amp;quot;Hello World!&amp;quot;&#xA;# xdg-open test.png&#xA;&#xA;qrencode -o &amp;quot;test2.png&amp;quot; &amp;quot;This is \&#xA;        a\&#xA;        multiline\&#xA;        qr-code\&#xA;      with a lot of text arsithraishtraihtsirts\&#xA;    rastarstnorastirahtensrahtierahts\&#xA;  arsnthierashtiersnhtearhtsierhsat\&#xA;ariesthresnth&amp;quot;&#xA;# xdg-open test2.png&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>How to download large files with onedrive on linux</title>
      <link>https://raveenkumar.com/posts/2022-09-29-download-large-files-with-onedrive-on-linux/</link>
      <pubDate>Thu, 29 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-29-download-large-files-with-onedrive-on-linux/</guid>
      <description>&lt;p&gt;I wanted to download about 25 GB size files on linux from onedrive but it kept hanging and failing after 50 MB sometimes it can download about 2.5 GB but still fails in-between. Tried different browsers but still it keeps failing.&lt;/p&gt;&#xA;&lt;p&gt;These are the following steps to use linux client to download large files,&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo dnf install onedrive&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Instructions to use&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md&#34;&gt;https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://abraunegg.github.io/&#34;&gt;https://abraunegg.github.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This works well. But still slow.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Battery information in i3 status bar</title>
      <link>https://raveenkumar.com/posts/2022-09-27-battery-information-in-i3-status-bar/</link>
      <pubDate>Tue, 27 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-27-battery-information-in-i3-status-bar/</guid>
      <description>&lt;p&gt;First create battery block,&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;battery 0 {&#xA;  format = &amp;quot; %status %percentage %remaining &amp;quot;&#xA;  format_down = &amp;quot; no battery &amp;quot;  &#xA;  last_full_capacity = false&#xA;  integer_battery_capacity = true  &#xA;  hide_seconds = true    &#xA;  status_chr = &amp;quot;&amp;quot;&#xA;  status_bat = &amp;quot;☉&amp;quot;&#xA;  status_full = &amp;quot;☻&amp;quot;&#xA;  low_threshold = 10&#xA;  threshold_type = percentage&#xA;  path = &amp;quot;/sys/class/power_supply/BAT0/uevent&amp;quot;&#xA;} &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;then add it to the order array,&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;order += &amp;quot;battery 0&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Make sure to check the path of the battery first. In my case it was &lt;code&gt;/sys/class/power_supply/BAT0/uevent&lt;/code&gt;. It might be different for other laptops.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Fix touch pad 3 finger gestures not working on fedora xorg</title>
      <link>https://raveenkumar.com/posts/2022-09-21-fix-touch-pad-3-finger-gestures-not-working-in-fedora-xorg/</link>
      <pubDate>Wed, 21 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-21-fix-touch-pad-3-finger-gestures-not-working-in-fedora-xorg/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/JoseExposito/touchegg#readme&#34;&gt;https://github.com/JoseExposito/touchegg#readme&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo dnf install touchegg&#xA;# You may also need to manually start the service&#xA;sudo systemctl start touchegg&#xA;sudo systemctl enable touchegg&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/JoseExposito/gnome-shell-extension-x11gestures&#34;&gt;https://github.com/JoseExposito/gnome-shell-extension-x11gestures&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Install this&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://extensions.gnome.org/extension/4033/x11-gestures/&#34;&gt;https://extensions.gnome.org/extension/4033/x11-gestures/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now you will be able to get the 3 finger gestures.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to find out what display server I am using</title>
      <link>https://raveenkumar.com/posts/2022-09-15-how-to-find-out-what-display-server-i-am-using/</link>
      <pubDate>Thu, 15 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-15-how-to-find-out-what-display-server-i-am-using/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://unix.stackexchange.com/questions/236498/how-to-get-information-about-which-display-server-is-running&#34;&gt;https://unix.stackexchange.com/questions/236498/how-to-get-information-about-which-display-server-is-running&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ps -e | grep tty&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>How to change hostname</title>
      <link>https://raveenkumar.com/posts/2022-09-13-change-hostname/</link>
      <pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-13-change-hostname/</guid>
      <description>&lt;h2 id=&#34;how-to-change-hostname&#34;&gt;How to change hostname&lt;/h2&gt;&#xA;&lt;h2 id=&#34;print-hostname&#34;&gt;Print hostname&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hostname -I&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo $HOSTNAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;to-change-hostname&#34;&gt;To change hostname&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo hostname -b &amp;lt;New name&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo echo &amp;lt;new name&amp;gt; /etc/hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;change name in &lt;code&gt;/etc/hosts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;If you are in wsl, add the following entry to &lt;code&gt;/etc/wsl.conf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-config&#34; data-lang=&#34;config&#34;&gt;[network]&#xA;generateHosts = false&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#xA;&lt;li&gt;Restart computer&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Start your commands with a comma</title>
      <link>https://raveenkumar.com/posts/2022-09-13-starting-your-commands-with-a-comma/</link>
      <pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-13-starting-your-commands-with-a-comma/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://rhodesmill.org/brandon/2009/commands-with-comma/&#34;&gt;https://rhodesmill.org/brandon/2009/commands-with-comma/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thunderbird authentication after office 365 password reset</title>
      <link>https://raveenkumar.com/posts/2022-08-23-thunderbird-authentication-after-office-365-password-reset/</link>
      <pubDate>Tue, 23 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-08-23-thunderbird-authentication-after-office-365-password-reset/</guid>
      <description>&lt;h2 id=&#34;thunderbird-authentication-after-office-365-password-reset&#34;&gt;Thunderbird authentication after office 365 password reset&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://kb.uwm.edu/uwmhd/page.php?id=109671&#34;&gt;https://kb.uwm.edu/uwmhd/page.php?id=109671&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting up email server</title>
      <link>https://raveenkumar.com/posts/2022-08-01-setting-up-email-server/</link>
      <pubDate>Mon, 01 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-08-01-setting-up-email-server/</guid>
      <description>&lt;p&gt;Luke smith explains how to setup an email server. With this I am able to receive email but not able to send. I think my VPS vultr blocked my outbound smtp port 25. Opened a ticket to resolve it.&lt;/p&gt;&#xA;&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;&#x9;&#x9;&#x9;&lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/9zP7qooM4pY?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;&#x9;&#x9;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/lukesmithxyz/emailwiz&#34;&gt;https://github.com/lukesmithxyz/emailwiz&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to use office365 email with thunderbird</title>
      <link>https://raveenkumar.com/posts/2022-07-15-how-to-use-office365-email-with-thunderbird/</link>
      <pubDate>Fri, 15 Jul 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-07-15-how-to-use-office365-email-with-thunderbird/</guid>
      <description>&lt;h2 id=&#34;how-to-use-office365-email-with-thunderbird&#34;&gt;How to use office365 email with thunderbird&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://uit.stanford.edu/service/office365/configure/thunderbird-oauth2&#34;&gt;https://uit.stanford.edu/service/office365/configure/thunderbird-oauth2&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Emacs can highlight git merge conflicts in buffer</title>
      <link>https://raveenkumar.com/posts/2022-05-30-emacs-can-highlight-git-merge-conflicts-in-buffer/</link>
      <pubDate>Mon, 30 May 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-05-30-emacs-can-highlight-git-merge-conflicts-in-buffer/</guid>
      <description>&lt;h2 id=&#34;emacs-can-highlight-git-merge-conflicts-in-buffer&#34;&gt;Emacs can highlight git merge conflicts in buffer&lt;/h2&gt;</description>
    </item>
    <item>
      <title>How to kill subprocess of a shell</title>
      <link>https://raveenkumar.com/posts/2022-02-08-kill-subprocess-of-a-shell/</link>
      <pubDate>Tue, 08 Feb 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-02-08-kill-subprocess-of-a-shell/</guid>
      <description>&lt;h2 id=&#34;how-to-kill-subprocesses-of-a-shell&#34;&gt;How to kill subprocesses of a shell&lt;/h2&gt;&#xA;&lt;p&gt;In bash &lt;code&gt;$$&lt;/code&gt; will get you current process id.&lt;/p&gt;&#xA;&lt;p&gt;You can use &lt;code&gt;pkill -P $$&lt;/code&gt; to kill all subprocess of the current shell.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   -P, --parent ppid,...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          Only match processes whose parent process ID is listed.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/2618403/how-to-kill-all-subprocesses-of-shell#:~:text=pkill%20%2DP%20%24%24,of%20the%20script%20itself&#34;&gt;Stackoverflow answer&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
