DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


The Shell Scripts that make up AIX

Over the years I've noticed that a lot of the core utilities on AIX are actually shell scripts. 
Here are some examples of these utilities on AIX that are either shell scripts (ksh/csh) or in some cases Perl scripts:
 
mksysb
oslevel
mkcd / mkdvd
useradd
userdel
usermod
prtconf
bosboot
mklv
shutdown
snap
lsconf
dsh
lsmksysb
savevg
which
chpv
chvg
cplv
exportvg
extendlv
migratelp
migratepv
mirrorvg
mktcpip
mkwpar
multibos
reducevg
reorgvg
replacepv
rmlv
rmlvcopy
splitlvcopy
splitvg
unmirrorvg
varyoffvg
 
As you can see, there are some pretty important commands in this list.  And this is just a small sample of them.  On my AIX server I found that there are over 400 scripts included as part of base AIX!  You can see a full list of all the scripts that make up your system by running a command like this:
 
for dir in `echo $PATH | tr ":" " "`; do for file in `ls -1 "$dir" 2>/dev/null`; do [ -x "$dir/$file" ] && file "$dir/$file"; done; done | grep -i script
 
It is pretty cool that so many of the core commands/utilities on AIX are made up of shell scripts.  For one, it shows that shell scripts can take on very important and critical tasks.  It can also be extremely helpful to be able to review the scripts if you are having any issues with any of these commands.  And these scripts can be an excellent learning tool.  These are extremely well written and robust scripts many of which have been used for decades on thousands and thousands of servers. 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.