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 http://lostsaloon.com or http://google.com 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…

how to enable and disable syntax highlighting in vi or vim editor

vi syntax on and off

Syntax Highlighting is a feature where the readability of the displayed text is enhanced by showing certain words, phrases or keywords in differing colors or fonts. This is especially useful when viewing source code of various programming, scripting or markup languages. In fact any text with an associated grammar can have syntax highlighting. Integrated Development Environments (IDE) or Programming Editors…

how to search for text inside a file in the vi editor in linux

vi editor and search expressions

The vi or vim is a console based text editor in Linux. It is probably the most useful of Linux applications, in that you can quickly view and edit the text files right at the command shell. When viewing the text files, one of the useful features is the ability to search for a word or some text in the file….

how to use brace expansion characters in linux command line and shell scripts

brace expansion notation in linux command shell

If you are a Linux power user, you are probably working a lot with command shell both the command line interface (CLI) as well as shell scripts. Linux command line provides a lot of flexibility and powerful options when working with different commands: regular expressions, wildcards, meta characters, operators, file and i/o redirection, brace expansion etc etc. We will see…

what are server response codes and how do they relate to seo?

broken links detection with wget

HTTP status codes are three digits numbers that are returned by a web server in response to a web request by a client. This code provides some general information about the status of the request to the client. The response may (or may not) also contain a descriptive text regarding the status of the request. The IANA (Internet Assigned Numbers…

how to set or change your homepage in mozilla firefox

Home page settings in Mozilla Firefox

Mozilla Firefox has several options to configure the start or homepage in the browser. The homepage button allows you to easily go to a specific webpage or URL. This is probably a website that you visit very often and is also your start page. There are a couple of different ways to set the homepage in the browser. You can…

understanding log files in linux…where to look when things go wrong

log files in the linux systems

If you spend any amount of time working on Linux environments, either as an user or as an administrator then it is inevitable that you will need to check the log files at some point. It is quite possible that the system or an application is misbehaving or is not working and the best way to fix the issue would be…