How to check certificate validity in Linux?
This article help you to check certificate expiry date from Linux command line using openssl utility. Check SSL certificate expiration date
This article help you to check certificate expiry date from Linux command line using openssl utility. Check SSL certificate expiration date
I have installed Centos 7 in Vmware WorkStation. I tried to install few new packages using yum install. However, I was getting error “Could not resolve host: mirrorlist.centos.org Centos 7″ Possible Reason for the issue and Resolution. 1. Ethernet Interface is disabled. Check ethernet status, if its disconnected then you need to enable it. Steps…
Pass date as mandatory arguments in bash script I came across a use case where I have to write a shell script to perform some action on two date ranges. The first argument would start date and the second argument as end date. To validate missing argument we can also check $1 and $2 null…
How to define multiline string variable in shell? In your bash/shell scripting experience you may face scenario where you need to define multi line string variable. Here is multiple ways to define multi line string variable in shell. Method 1: Combine Multiline with \n like below and echo with -e option method1=”This is line no.1\nThis…
Shell script to pass multiple arguments with options This tutorial will help you to pass multiple arguments in a more organized manner. I have used two arguments “t” and “d” here. The first argument “t” will accept task value and based on the task value you can perform the respective action for a particular date(“d”)….
Here is the simple step by step guideline to cut and paste in Vim editor. Press esc if vim editor in insert mode Position the cursor where you want to start cutting. Press v to select the characters and move the cursor at end of character you want to cut. …
How to Run a Linux Script During Reboot or Startup I come across one use case where I need to run a Linux script during reboot or startup of the system. To handle this use-case I have created new script in /etc/init.d/myscript. Lets consider the below example script. /etc/init.d/myscript #! /bin/sh ### BEGIN INIT INFO #…
Deleting Lines Containing Specific string from multiple files Deleting Lines Containing Specific string from multiple files recursively Syntax: Example: Below example delete lines containing @license tag from src/main/php directory all files recursively Option Description: -R or –dereference-recursive For each directory operand, read and process all files in that directory, recursively, following all symbolic links. -l…
Simple bash Script to get the list of files and directories inside the specified path Sometimes we want to get the list of files and directories recursively, but it is tedious to navigate each directory to check all the files. Here are the simple commands which will help you to check all the files and…
Delete a git branch This article will demonstrate, how we can delete a git branch from local or remote git repository. Syntax: git branch -d<branch> git branch -d test-branch If you face any error like “error: The branch ‘test-branch’ is not fully merged” and you are still want to delete this branch then you can…