Linux / Unix : 3 Commands to read file inside compressed .gz files without extracting
In this post we will learn about 3 simple commands by which we can read the files inside the compressed .gz file without extracting it.
In this post we will learn about 3 simple commands by which we can read the files inside the compressed .gz file without extracting it.
In ESX , passwd: authentication information cannot be recovered The ESX box has AD authentication. I was getting error when I am trying to reset user password by using command “passwd user_name” Whenever U get this error “passwd: authentication information cannot be recovered”,it means something is wrong in ur some /etc/pam.d files. In my case…
df not showing correct free space in linux In this post,I am sharing the troubleshooting. When we find the disk is full,we generally remove the files from that partition.Sometimes it is also observed that after removing files from the partiton. The df -h command,still shows partition is full. For this problem,follow the given below steps…
In this post we are sharing the script to change group from a file having list of users. You can do the changes in script as per your requirement. The script is also using the /etc/group file to validate group names which could be existing in user supplied group file. Given below is the sample…
In this post learn how to set and reset user password by bash script on Linux systems. It is quite good for Linux System Admin who wants to know how to set and reset user account password with bash script. We have used the standard input (stdin) with passwd command. Advantage: 1. Get the list…
In this post we will learn how to customize the nologin shell message for user on linux/unix system. This is very useful when you want to display your company strict legal security message to users who are trying to login into your servers. As we know that , nologin shell won’t allow user to login…
How To Use opt In Bash Script,Example This is an exmaple of how to create bash script with Opt in. #!/bin/bash echo “Select no. for option” OPTIONS=”Hello LinuxTribe Quit” select opt in $OPTIONS; do if [ “$opt” = “Quit” ]; then echo done exit elif [ “$opt” = “Hello” ]; then echo Hello World elif…
How To Use case in Bash Script, Example This is only an example. #/bin/bash echo “Give Full Path where the file is located” read pth echo “Give the file name” read fle if [ -f $pth/$fle ];then echo “$fle file is found in $pth” else echo “$fle file not found in $pth” echo “U r…
In this post, we will know how to do non-interactive apt install in Debian Operating System.
By this method you can skip the interactive query ask while doing apt or apt-get install command.
In this post, we will learn about how to do Xen Virtual Machine migration from one Host Base Machine to other. We hope you know how to create a Virtual Machine in Xen. Our both host machines had the same specs and same LVM management. Here LVM Management means in both host machine we have…
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol helps to assign ip address automatically and dynamically to client machine.In this post we will learn how to install and configure DHCP server in RHEL 5. Note: DHCP runs on UDP port 67 for the DHCP serve and UDP port 68 for the DHCP client machines….
While working on sed command stricken with this, error : “sed: -e expression #1, char 24: Invalid range end “). To solve this problem, we have used sed and tr command. We made a bash script having expect command in it. We were passing variable value from my mysql database into the bash script. The…
In this bash script we will use expect scripting. Expect is known primarily as an indispensable application for system administrators. We use expect generally in case where input from user is required , for eg. ssh, ftp, telnet, sudo etc. Given below is sample bash script which will first ssh the remote host and then…
In this post we will create Nagios plugin check_mailfromd in bash script.This nagios plugin is written in a very simple way and easy to understand. Task To check service status of mailfromd service. Create nagios plugin check_mailfromd Create a new bash script file called check_mailfromd. Use your favorite file editor for this, we in general…
Introduction In this post we will share about the “Xen Server License Nagios Plugin” written in bash script. It was good experience to create the nagios plugin for Xen server license. Task To show how many days are left for Xen Server expiration. Requirement You must have following items to be installed in system. 1….