Tag archives for linux - Page 2
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 Syntax: openssl x509 -enddate -noout -in <certificate name> openssl…
Could not resolve host: mirrorlist.centos.org Centos 7
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: Centos 7" [root@localhost…
Pass date as mandatory arguments in bash script
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.…
How to define multiline string variable in shell?
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…
Shell script to pass multiple arguments with options
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"…
Cut and paste in Vim editor
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…
How to Run a Linux Script During Reboot or Startup
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…
Deleting Lines Containing Specific string from multiple files
Deleting Lines Containing Specific string from multiple files Deleting Lines Containing Specific string from multiple files recursively Syntax: grep -Rl "STRING" /directory/path/ | xargs sed -i "/STRING/d" Example: Below example…
Get the List of Files and Directories Recursively in Linux
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…
How to Delete a Git branch?
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…