how to delete lines in vi or vim editor in linux

vi editor and search expressions

If you use vi or vim editor to edit text files, then you should know different text manipulation commands that exist in the editor. One of the common actions you will perform is the deletion of a line or multiple lines from with in the editor. Let’s see the various ways you can delete a line in the vim editor….

how to use the tail command to view files in linux

linux tail command

There are several different ways to view text files in Linux. You can use a text editor such as vi or gedit. You can also use an utility like more or less that will print out the complete content of the file. tail is yet another utility that will allow you to view the contents of a file. However, there…

how to insert vertical line in html

Inlining css in html helps with SEO

It is easy enough to insert or draw a horizontal line in html. But how do you draw a vertical line in html? Unlike for the horizontal line, there is no single tag in html that will draw the vertical line. But that does not mean it is impossible to do so. Using CSS One way to do this is…

how to unzip files in linux command line

unzip zip archive

In Linux, tar and gzip is the widely used archiving and compressing file format. Another most widely file compression file format is zip, which is more popular in other operating systems such as Windows. However it does not mean that Linux does not support the zip format. There are utilities in Linux that you can use to uncompress zip files….

how to write comments in html source code

comments in html source

If you have done programming in any language, you must realize how important comments are in understanding code. Of course, you need to write good comments and maintain them regularly. When done correctly, it is an invaluable tool in understanding code logic in long running code bases. HTML or Hyper Text Meta Language is no different. HTML is not a…

brace expansion in linux simplfied with examples

brace expansion notation in linux command shell

If have been bash programming, then you must have seen brace expansion syntax being used in shell commands. The main purpose of brace expansion is automatically generate a set of strings (or numbers) that follows a general pattern. The pattern is enclosed with curly braces: ‘{‘ and ‘}’. This leads it to be commonly referred to as the brace expansion…

how to use ‘for’ loop in bash shell scripts

for loop in bash

If you have done any programming in any language, you should be familiar with loops. Almost all computer programming languages have some version of a loop statement. It is a language construct that allows you to execute a specific piece of code repeatedly, often with different set of data. In this post, we will talk specifically about the for loop…

how to delete a folder or directory in linux

Linux command line delete files

The Linux command to delete a folder or directory is the same as the one to delete a file. You can use the rm command to delete both files and folders. Deleting an empty directory is easy enough but if you try to remove a directory that has files in them, you will get an error. deleting an empty folder…

how to forward root domain to www in google domains

Root domain forwarding DNS

Many times you would want to forward your root domain to a subdomain of your website. The root domain which is also referred to as the naked domain or the bare domain is the website url that does not have an entry before the site name. For example, the URL or are examples where it refers to a…

how to setuid for a file in linux

qalc or qalculate calculator in linux command line

SetUID stands for set user id on execution. The Linux systems allow for elevated or escalated privileges when executing files. This is a special type of permission that can be set on the file in addition to the usual set of file permissions. When the setuid is set on an executable file, the users can execute that file with the…

the recipe to the armour cocktail: a manhattan variation

armour drink recipe

The Armour Cocktail is a classic drink which dates all the way to the early 20th century. The drink has since lost its popularity and is hardly seen in modern days. The recipe to the drink first appeared in the early edition of Straub’s Manual of Mixed Drinks published in the 1910s. You could see that the drink is very similar…

how to make a rusty nail cocktail drink

rusty nail cokctail

The Rusty Nail is one of the classic drinks that dates back to the early 20th century. The drink contains just two ingredients and is a very simple drink to make. The base ingredient is the Scotch Whisky, while the other is a liqueur that is based on Whisky. Despite the simplicity of the drink, it has been one of…