how to ease navigation with CDPATH

$CDPATH=:..:~:~/projects

Set CDPATH to ease navigation

CDPATH tells the cd command to look in this colon-separated list of directories for your destination. My preferred order are

1) the current directory, specified by the empty string between the = and the first colon,

Continue reading

Posted in AIX, Linux, Solaris, VIO | Tagged , , , , | Leave a comment

Shell Script for Leap Year

Hello every body,
i have below a nice script to tell year the year is Leap or NOT.just copy the following line into a new file name it leap.ksh

# Shell program to read any year and find whether leap year or not
# -----------------------------------------------
# Copyright (c) 2005 nixCraft project 
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# store year
yy=0
isleap="false"
#echo -n "Enter year (yyyy) : "
#read yy
yy=$1
# find out if it is a leap year or not
if [ $((yy % 4)) -ne 0 ] ; then
   : #  not a leap year : means do nothing and use old value of isleap
elif [ $((yy % 400)) -eq 0 ] ; then
   # yes, it's a leap year
   isleap="true"
elif [ $((yy % 100)) -eq 0 ] ; then
   : # not a leap year do nothing and use old value of isleap
else
   # it is a leap year
   isleap="true"
fi
if [ "$isleap" == "true" ];
then
   echo "YES"
else
   echo "NOT"
fi

Continue reading

Posted in Shell Script | Tagged , , | Leave a comment

How to change welcome message in AIX

of course each time you login to the server you see the following welcome Message :

*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 6.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************

Continue reading

Posted in AIX | Tagged , , , | Leave a comment

How to make the System Ring

if you are a Shell Scripting Developer and all the time deveolpe Shell Scripts, if course you need to make your System Ring after finished the script or when it needs data from the user.

try this code on AIX
Continue reading

Posted in AIX, Linux, Shell Script | Tagged , , , , , | Leave a comment

how to set the Terminal Name on the top

Nice way to separate between your terminals by it’s name not IP Address.

 

the default way, when you open SSH Terminal using Putty (or any other Communication program like kitty) The IP Address of the server
will be shown on the top of the terminal like the following Image:

Continue reading

Posted in Shell Script | Tagged , , , | Leave a comment

How to mount,unmount an ISO Image in AIX

Sometimes you need to install package from AIX CD or install any other software like PowerHA on LPAR and the CD UNIT was located into another LPAR or you don’t have

the CD but you have the ISO Image for this Software.

Continue reading

Posted in AIX | Tagged , , , , , , | Leave a comment

Script to list all LPARs on all Managed Systems Connected to HMC

if you have Many Managed Systems connected to HMC and you need to list ALL LPARs that you have on a table view like the following output:

-----------------------------
Server Name : Server-****-***-***
------------
LPAR Name          LPAR Number   IP Address
TEST1                             5                       10.10.10.1
TEST2                            4                       10.10.10.2
TEST2                             3                      10.10.10.3
TEST4                            2                       10.10.10.4
LPAR                              1                       10.10.10.5
VIO                                  6                      10.10.10.6

Continue reading

Posted in HMC | Tagged , , , , | Leave a comment

cfgmgr: 0514-621 vdevice

if you use VIO Server and need to share CD or TAP UNIT or Disks from VIO to LPAR, and after finishing from Mapping Configuration and try to run “cfgmgr on the LPAR,

 

you may see the following Error : Continue reading

Posted in AIX | Tagged , , , , , , , , , | Leave a comment