• RSS
  • SmsJobs
  • Sms
  • GoogleBuzz
  • Facebook
  • Twitter
  • Linkedin
  • Youtube
The Linux Juggernaut

The Linux Juggernaut

roles on……

Archive for the ‘Scripting’ Category

Q. I have a requirement to check whose accounts are expired in Linux machine and send a mail to root user about the accounts. How can i achieve this in Linux?

Ans : Here is the script to check the account expires of the users in Linux

#Created on:09-02-2010
#Last modified:02-05-2010
#Purpose:To check the user account status in Linux
#Author:Surendra Kumar Anne
#The below command will grep all the users in shadow file
#whose expiry … Continue Reading
Posted by Surendra Anne On Tuesday-Feb - 22 - 2011 1 Comment READ FULL POST

Today we came across a requirement to check all the files in a directory for a specific entry. The situation is like this. We have two public DNS servers, we usually take backups of zone files when ever doing some changes to zone files. So all the backups are there in one folder. My duty is to check in which file we have did a particular change in our second DNS server. … Continue Reading

Posted by Surendra Anne On Thursday-Feb - 17 - 2011 1 Comment READ FULL POST

Some times you want to rename a group of files to lower case from upper case.  This renaming can be achieved by using a shell script and a tr command which will translate upper case to lower case

Here is my version of the script to do the activity.

#Created on:02-02-2011
#Last modified:02-02-2011
#Purpose:To Convert files/folders from upper case to lower case names
#Author:Surendra Kumar Anne
#The below for loop will take inputs from Continue Reading
Posted by Surendra Anne On Sunday-Feb - 6 - 2011 2 Comments READ FULL POST

How to write bash shell to check the state of all services which are running/stopped in Linux?

Ans :

#Created on:02-02-2011


#Last modified:02-02-2011


#Purpose:To Check the status of services


#Author:Surendra Kumar Anne


#The below for loop will take inputs from chkconfig command to check the services which are running/stoped on the machine.
for i in `chkconfig --list | awk '{print $1}' | grep -v :`
do
/sbin/service $i status
done

This script will take services … Continue Reading

Posted by Surendra Anne On Thursday-Feb - 3 - 2011 2 Comments READ FULL POST
windows-os-vs-linux-os
When I started my career in IT field, I have landed into windows world, as I know that no companies give chance to a fresher to work on production Linux/Unix servers. Its a good experience to work on DOS scripts(aka Batch programming). There are many similarities/differences/advantages/disadvantages between Batch programming and Shell scripting. Lets see what they are.

Similarities

Sl.No Batch programming Shell script
1 Sequential execution of  group commands in a batch file Sequential

Continue Reading

Posted by Surendra On Thursday-Jan - 28 - 2010 1 Comment READ FULL POST

email newsletter

Redhat Flagship dist

Redhat announced that they are going to release RHEL7 by ...

12 examples to use f

Flower brackets examples This is a small post on how to ...

7 Linux read command

read command examples read command is useful in scripts when reading ...

7 linux sort command

Linux/Unix sort command examples This is a small tutorial on how ...

How to find command

How to find command location in Linux and Unix This is ...

  • About Linux Juggernaut

    How the blog name selected? Juggernaut: * a massive inexorable force that seems to crush everything in its way ...readmore>>

  • Contact Me

    Contact us Send an Email Phone number and vCard LinkedIn profile Advertise with us
  • About Me

    Surendra Kumar Chowdary

    My name is Surendra Kumar Anne. I am from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present i work at Persistent Systems as Module Lead.   read more »