Unix Linux Docs

Common Linux / DB2 Commands
By Junshan Li 2003


A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X Y Z

A

xterm -bg purple &    ## Creates an aix terminal window with purple background
xterm -bg blue -fg yellow -cr red &    ## -cr: red cursor color
alias                              ## Defines or displays aliases.
alias tools="cd /tpc/tpcd/tpcd/tools"
alias cust="cd /tpc/tpcd/tpcd/custom"
# apache web server:
    /usr/local/apache/bin/apachectl start/stop

apropos                        ## Locates commands by keyword lookup.
apropos compiler         ## compiler is the keyword to locate different compilers on the system
ar -t -X 32_64 libdb2osse.a   ## list the content of the archive file
arp -a                          ## Address Resolution Protocol, translate ip addr to mac address
awk                             ## a good language for text processing on unix systems

B

basename                   ## Returns the base file name of a string parameter.
basename /u/junshan/bin/1cfg.ksh      ## returns "1cfg.ksh"
bash                            ## invokes the Bourne Again shell.
bc                              ## Very useful unix calculator, similar to "dc"
bg                              ## Runs jobs in the background.

C

cal [ [ Month ] Year ]  ## Displays a calendar.
cat [ -q ] [ -r ] [ -s ] [ -S ] [ -u ] [ -n [ -b ] ] [ -v [ -e ] [ -t ] ] [ - | File ... ]   ## Concatenates or displays files.
        cat /usr/lpp/bos/aix_release.level  ## Check AIX release level
        cat /usr/lpp/ssp/opt*    ## get PSSP installed level
        cat /etc/resolv.conf     ## information about the domain name server
        cat /proc/cpuinfo        ## get cpu information.
cd                               ## Changes the current directory.
cd ..
cd -
cdrecord -scanbus       ## Prepare CD ROM recording
        mount -t iso9660 -o ro,loop=/dev/loop0 ./SLES-7-PatchCD-2-i386-RC3.iso /cdrom
        time cdrecord -dev 0,0,0 ./SLES-7-PatchCD-2-i386-RC3.iso  ## do actually CD recording.
        cdrecord -v speed=16 dev=0,1,0 [image]
chmod                         ## Changes file modes (file permissions).
        chmod a+x *sh
        chmod 777 log spool execute
        chmod +ug   ## Turn on sticky bit
chown                         ## Changes the owner or group associated with a file.
        chown -R junshan.usr /llperf
        chown tpcd.dbadm /dev/rdata*  /dev/ridx*  /dev/rtm*

clear                            ## Clears the terminal screen.
cmp [ -l | -s ] File1 File2  ## Compares two files.
cp                                ## copies files or directories (with -R option)
        cp media.2/media media.1/media  # SLES nfs install fix
crontab                        ## Submits, edits, lists, or removes cron jobs
crontab -l
cut                               ## Writes out selected bytes, characters, or fields from each line of a file.
        cut -f 1,5 -d : /etc/passwd
        cut -f2 -d":" ora_errors|sort -u
        ls -l | cut -c10-13
cvs
        ## cvs code: cvs-1.11.4.tar.gz  on http://www.cvshome.org/
        ./configure --prefix=/usr/local; make; make install   ## install cvs.
        export CVSROOT=:pserver:anoncvs@www-124.ibm.com:/usr/cvs/blueice
        cvs log # enter password here
        cvs checkout ibmj2ee  ## This will extract the code into the current dir with a top level dir of "ibmj2ee".
        # The ibmj2ee module has the following release and branch tags:
        RELEASE_1_0 - 1.0
        RELEASE_1_0_1 - 1.0.1
        BRANCH_1_0 - 1.0.x development
        RELEASE_1_1 - 1.1
        BRANCH_1_1 - 1.1.x development
        # To checkout a particular release or branch use the command
        cvs checkout -r [tag] ibmj2ee   ## Where [tag] is one of the tags above.
        cvs diff -u > /tmp/"name".patch
        cvs -q update

D

date                             ## Displays or sets the date or time.

## DB2 Commands:
db2icrt -u qual -p 10010 -s eee qual
db2 connect to tpcd
db2 "create NODEGROUP ng_all on node (1)"
db2 "create NODEGROUP ng_all on node (0)"
db2 "create NODEGROUP ng_node1 on node (0)"
db2 "drop nodegroup ng_all"
db2untag /dev/rqldp1
db2 create database TPCDQUAL on /db collate using identity with \"TPCDQUAL 1GB\"
db2 drop db qual  ## for recovery
db2 connect to tpcdqual
cd $HOME/tpcd/custom
db2 -tvf create_nodegroups.ddl
db2 -tvf create_bpools.ddl              ## Create buffer pools
db2 -tvf tempg.ddl                          ## Create temp tablespace
db2 -tvf create_tbspaces.ddl           ## Create tablespaces
db2 DROP TABLESPACE TEMPSPACEX
db2 -tvf create_temp8K.ddl
db2 -tvf create_tables.ddl                ## Create tables
db2 -tvf createUfTables.ddl
db2 drop table qual.region
db2 grant connect on database to public
time db2 -tvf dbmcfg_loadQUAL
time db2 -tvf dbcfg_loadQUAL   ## on both
db2stop
db2start
db2 -tvf load_partsupp.ddl
db2 -tvf load_part.ddl
time db2 -tvf load_customer.ddl
time db2 -tvf load_supplier.ddl
time db2 -tvf load_orders.ddl
time db2 -tvf load_lineitem.ddl
db2 "load from /sortdata/links/region.tbl of del modified by coldel| fastparse noheader messages /tmp/qual/region.msg replace into TPCD.REGION nonrecoverable"
db2 "load from /sortdata/links/nation.tbl of del modified by coldel| fastparse noheader messages /tmp/qual/nation.msg replace into TPCD.NATION nonrecoverable"
time db2 -tvf create_indexes.ddl    ## create indexes:
time db2 -tvf runstats.ddl               ##  runstats
## editted tpcd.setup under custom
/home2/db2inst1/tpcd/tools/setupDir
buildtpcdbatch QUAL                  ##  run buildtpcdbatch QUAL
$HOME/tpcd/tools/setupRun       ## # 11) setup run
echo "1" > /home2/db2inst1/tpcd/QUAL.db2inst1.update.pair.num   ## Set up at necessary file
runqual                                         ## run qualification database (query 1 to 22).
/usr/opt/db2_08_01/instance/db2iupdt -w 64 db2inst1  ## update db2 instance as root
db2_kill
db2 connect reset
db2 get dbm cfg|grep DIAG
db2batch -d tpcd -f tpcd/auditruns/run75/querytext/qtext10.sql -r tmp.out
db2 force application all
db2 "select tbspace, overhead, transferrate from syscat.tablespaces"
db2 -svtf update.tbs
db2 set current explain mode explain
db2 set current explain mode no
db2 list applications
db2 commit
db2 update db cfg for tpcd using num_iocleaners 4

# db2 install issues:
        ./db2_install -p DB2.WSE
        groupadd db2iadm1
        groupadd db2fadm1
        groupadd db2asgrp
        useradd -g db2iadm1 -m db2inst1
        useradd -g db2fadm1 -m db2fenc1
        useradd -g db2asgrp -m db2as
        usermod -G db2asgrp root
        usermod -G db2iadm1 root
       /opt/IBM/db2/V8.1/instance/dascrt -u db2as
        /opt/IBM/db2/V8.1/instance/db2icrt -a SERVER -u db2fenc1 db2inst1
        rpm -ivh --force IBMJava2-SDK-1.3.1-2.0.i386.rpm
        /opt/IBM/db2/V8.1/adm/db2licm -a db2/license/db2wsue.lic
        su - db2as -c "db2admin stop"
        su - db2as -c "db2admin start"
        su - db2inst1 -c db2start
        su - db2inst1 -c db2stop
        # To generate the encrypted version using:
        htpasswd -nb foo foo   # the result looks like "foo:doLkhn0x0q9ek"
        htpasswd -nb password password | awk -F: '[ print $2 ]'  # pull the encrypted password out
        db2 update database cfg for ldap using applheapsz 1280
        db2 update database cfg for ldap using pckcachesz 360



# remove db2:
        rpm -qa|grep db2 |while read line;do rpm -e $line; done

dc                               ## desk calculator, similar to "bc"
dd                               ## Converts and copies a file. 

        dd if=bootdisk of=/dev/fd0u1440  ## create a bootdisk on a floppy
        dd if=modules1 of=/dev/fd0u1440
        dd if=rescuefloppy of=/dev/fd0u1440
        dd if=modules3 of=/dev/fd0u1440

        ssaraid -Il ssa11 -n hdisk17
        dd if=/dev/rhdisk17 of=/dev/null bs=64k
        dd if=/dev/rhdisk17 of=/dev/null bs=32k
        dd if=/dev/rhdisk17 of=/dev/null bs=96k
        dd if=/dev/rhdisk17 of=/dev/null bs=128k
        dd if=/dev/rhdisk17 of=/dev/null bs=512k
        dd if=/dev/zero of=/dev/rhdisk17 bs=512k
        dd if=/dev/zero of=/dev/rhdisk17 bs=128k
        dd if=/dev/zero of=/dev/rhdisk17 bs=96k
        dd if=/dev/zero of=/dev/rhdisk17 bs=64k
        dd if=/dev/zero of=/dev/rhdisk17 bs=32k
        ssaraid -D -l ssa11 -nhdisk16 -u
        ssaraid -D -l ssa11 -nhdisk17 -u
        time dd if=/dev/rhdisk32 of=/dev/null bs=128k count=10000   ## good to test hdisk speed together with iostat
df -k                           ## Reports information about space on file systems in kilobytes.
        df -T                   ## Report file system types
# dhcp  related commands:
        dhcpcd eth0
        vi /etc/dhcpd.conf
        vi dhcpd.conf
        insserv dhcpd
        rcdhcpd start

diff                             ## Compares text files.
dirname                      ## Writes to standard output all but the last part of a specified path.
dirname /afs/aix/u/lij    ## returns "/afs/aix/u"
du                              ## Summarizes disk usage.
        du -sk /var/*
        du -k . | sort -n

E

echo                          ## Writes character strings to standard output.
        echo $HOME
egrep                        ## Similar to grep, but more powerful.  Searches a file for a pattern.
        egrep "eth0|eth1"  /etc/modules.conf
env                           ## Displays the current environment or sets the environment for the execution of a command.
exit                           ## exit the login shell
export PATH=/usr/lpp/LoadL/full/bin:$PATH
exportfs                    ## Exports and unexports directories to NFS clients.

F

fg                             ## Runs jobs in the foreground.
file                            ## Determines the file type.
        file *
find                          ## Finds files with a matching expression.  Very useful.
        find . -name *.pl -print
        find / -xdev -name '*.preibmj2ee'
        find /lib/modules -name *905*   ## find modules
        find /lib/modules -name *3c9*
        find /lib/modules -name net
        find /lib/modules -name '*ide-scsi*'
        find / -name '*.preibmj2ee
        find /etc -type f | xargs grep eth0eth0
        find /etc -type f | xargs grep eepro100 
        find i386 s390 | sort > files
        find i386 s390 | sort | xargs sum > sum
        find . -type f | sort | sum
        find . -type f

finger                       ## Shows user information. This command is the same as the f command.
        finger lij
fsck                         ## Checks file system consistency and interactively repairs the file system.
        fsck /dev/dbrawlv8
        time yes| fsck /rawdata00007
ftp                           ## Transfers files between a local and a remote host. 
         # enable anonymous ftp on Linux:
        vi /etc/inetd.conf  ## uncomment  # ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  vsftpd
        rcinetd restart
        vi /etc/vsftpd.conf
        rcinetd restart

        ftp -n << EOF>             open d02xdg005.maint.southbury.ibm.com
            user rootdb2 $1  # you have to provide a password in order to run this script.
            cd /dataprop
            lcd /tempfs
            get aixCAE61f3.tar
            bye
        EOF

G

gprof                     ## Displays call graph profile data.
        a) compile source code using -pg flag: cc -pg test.c -o test1
        b) run test1 to get gmon.out
        c) check code performance using: gprof gmon.out
grep                      ## Searches a file for a pattern.
gunzip *gz             ## unzip a .gz file

H

head                     ## Displays the first few lines or bytes of a file or files.
head -20
history                  ## Displays the command history
host                      ## Resolves a host name into an Internet address or an Internet address into a host name.
        host performance.pok.ibm.com
hostname              ## Sets or displays the name of the current host system.
        hostname c698s.ppd.pok.ibm.com  ## set the hostname of the machine
        hostname --long  

I

id                         ## Displays the system identifications of a specified user.

## Blue Ice Commands
ibmj2ee                ## BlueIce main code
        # blueIce base add-ons: 1) IBMJava2-SDK 2) gettext 3) minicom 4) pdksh 5) python
        # blueIce pkgs: DB2_AE.zip, FP7_U484487.tar, ibmdir410-liux-us.tar, sysstat-4.0.6.tar.bz2, was40_ae_ptf_4_linux.intel.tar
        # blueIce website: http://gnulinux.austin.ibm.com/blueice/raw
        rpm -q k_smp        ## determine if patch3 is installed.

        ## building ibmj2ee related commands
        export CVSROOT=:pserver:anoncvs@www-124.ibm.com:/usr/cvs/blueice
        cvs login
        cvs checkout ibmj2ee
        cd ibmj2ee
        make; make rpm; make tgz
        make realclean
        make install
        rm -fr /opt/IBMJ2EE
        rm -fr /var/log/IBMJ2ee

        cd /tmp;mcopy a:ibmj2ee.tgz /tmp
        sum ibmj2ee.tgz
        tar xfz ibmj2ee.tgz
        rpm -i ibmj2ee.rpm
        export PATH=/opt/IBMJ2EE/sbin:$PATH 
        vi /var/log/IBMJ2EE/log

        ibmj2ee_install zero intranet low wasnode1 ldap
        ibmj2ee_install zero intranet low wasnode1 db ldap
        ibmj2ee_install zero intranet low datanode1 db ldap
        ibmj2ee_install zero intranet low wasnode1 ldap nfs
        ibmj2ee_install zero intranet low wasnode1 nfs notrade
        ibmj2ee_install zero internet high wasnode1 datanode ldap nfs 
        ibmj2ee_install zero intranet low wasnode1 datanode ldap nonetwork

        ibmj2ee_install one
        ibmj2ee_config switch absent
        ibmj2ee_config phase                ## display installed phase
        ibmj2ee_install two
        http://localhost/servlet/snoop
        ibmj2ee_uninstall image
        ibmj2ee_uninstall unpack
        imbj2ee_protocol network
        ibmj2ee stop
        ibmj2ee_network config
        PATH=/opt/IBMJ2EE/lib/script:$PATH bash -x network_config intranet datanode1 | tee network_config.out
        PATH=/opt/IBMJ2EE/lib/script:$PATH network_config_create
        bash -x network_config jli.conf
        PATH=/opt/IBMJ2EE/lib/script:$PATH network_config jli.conf
        network_reset

        rcnetwork stop
        rcnetwork start
        rcroute start
        /var/log/IBMJ2EE/network_config.log
        PATH=/opt/IBMJ2EE/lib/script:$PATH bash -x network_config intranet datanode1
        vi /opt/IBMJ2EE/lib/data/topology/intranet/datanode1

        ## apply a patch to /opt/IBMJ2EE/lib/func/java_install:
        54a55,59
        > rpm -q $JAVA_PACKAGE >> $IBMJ2EE_COMMAND_LOG 2>&1
        >               if [ $? -eq 1 ]
        >               then
        >                   exit 0
        >               fi
        # Save that (exactly) to a file and try "cd /opt/IBMJ2EE/lib/func; patch -p0 < [patch_file]"

        ## Unit test:
        1. cp /opt/IBMJ2EE/sbin/ibmj2ee_upgrade to /tmp/testit
        2. edit /tmp/testit and change "require_solution_state stopped" to
            import java_install
            java_install
        3. bash -x /tmp/testit

ifconfig                 ## Configures or displays network interface parameters for a network using TCP/IP.
        /etc/init.d/network restart   ## restart network on SLES 

        ifconfig tr0 down
        ifconfig tr0 9.117.148.148 broadcast 9.117.148.255 netmask 255.255.255.0

        ifconfig eth1 10.1.1.254 broadcast 10.1.1.255 netmask 255.255.255.0
        ifconfig eth0 192.168.10.254 broadcast 192.168.10.255 netmask 255.255.255.0
        ifconfig eth0 9.3.192.165 broadcast 9.3.192.55 netmask 255.255.255.0
        ifconfig eth0 192.168.64.191 broadcast 192.168.64.255 netmask 255.255.255.0
        route add default gw 9.3.192.1
        route add default gw 192.168.64.1
        nameserver 9.3.192.21
        nameserver 9.53.183.2
        nameserver 9.3.199.2
        dhcpcd eth0               ## use dhcp to bring up network after network was inserted. (insmod)
        ifconfig all
        ifconfig eth0 down
        ifconfig eth0 up
        ifconfig -au
        ifconfig -a
        tcpdump -i en0
        netstat -s
        ifconfig en0 down detach
        ifconfig -d ssa49 up
        ifconfig css0           ## Will provde switch IP address
        ifconfig en0            ## Provide node IP address
        for i in rc.config route.conf modules.conf resolve.conf; do
            if [ -e $i ];  then
                cp $i $i.dist
            else
                touch $i.dist
            fi
        done
        vi /etc/rc.config  /etc/HOSTNAME /etc/hosts /etc/resolv.conf
insmod 3c90x      ## insert module 3c90x
        insmod ide-scsi  ## insert scsi driver
        modprobe eepro100
        vi /etc/modules.conf
        depmod -a   ## refresh modules after editing /etc/modules.conf file 
        find / -name olympic*
        cd /lib/modules/2.4.19-4GB/kernel/drivers/net/tokenring/
        insmod olympic.o
        find / -name 3c90*
        insmod /lib/modules/2.4.19-4GB/kernel/drivers/net/3c90x.o

ipcrm                  ## Removes message queue, semaphore set, or shared memory identifiers.
ipcs                    ## Reports interprocess communication facility status.
        ipcs -a | grep qual
        ipclean -a

J

jobs                    ## Displays status of jobs in the current session.

K

kill                   ## Sends a signal to running processes.
        kill -9
        kill 43184 72506
        kill -9 %1 
        kill $(ps --no-headers -C ibmdiradm -o %p%P | awk '$2 == 1 [ print $1 ]') 2> /dev/null
        kill $(ps --no-headers -C ibmslapd -o %p%P | awk '$2 == 1 [ print $1 ]') 2> /dev/null

killall                ## Cancels all processes except the calling process.  Should not be used as "root", otherwise have to reboot.
ksh                  ## Invokes the Korn shell.

L

ldapcfg -n -p passwd   # ldap command
        rpm -i ldap-clientd-5.1-1.i386.rpm ldap-html_en_US-5.1-1.i386.rpm ldap-msg_en_US-5.1-1.i386.rpm
        rpm -i ldap-serverd-5.1-1.i386.rpm ldap-webadmind-5.1-1.i386.rpm

lilo                  ## linux load
linuxconf         ## configure system parameters on RedHat Linux
## Linux installation:
           a) Used GNOME installation, text version.
           b) Need to pick the correct display (1024x768x4mgx76Hz)?
           c) Network: hostname: spPerformance.pok.ibm.com
                   IP address: 9.117.7.17
                   DNS: 9.117.5.254, 9.117.253.254
                   Default gateway: 9.117.7.251
                   Net mask: 255.255.255.0
                   Configure Mode: manual
                   Net device: tr0
                   Kernel module: ibmtr
                   I/O port (opt):
                   Irq (opt):

ln [ -f ] [ -s ] SourceFile [ TargetFile ]  ## Links files.
        ln -s /rawdata00001/rawdata00000 /rawdata/rawdata00000
        ln -sf /rawdata00001/rawdata00000 /rawdata/rawdata00000
        ln -fs /dev/sr0 /dev/cdrom
locate ifcfg-eth0  ## locate something
ls                     ## Displays the contents of a directory.
        ls -a
        ls -l /unix
        ls -ltr
        ls -ld .
        ls /afs/aix/project/sprellyn/build/rlyns07a/src/ll/lib/api
        ls -l /lib/modules/2.4.7-64GB-SMP/kernel/drivers/net/3c90x.o
        ls /etc/*.preibmj2ee
lsattr                ## Displays attribute characteristics and possible values of attributes for devices in the system.
lsdev              ## Displays devices in the system and their characteristics.
lsmod            ## list modules loaded.
        insmod
        insmod ./eepro100.o
        rmmod
lspci               ## List hardware components

M

mail             ## Sends and receives mail.
        mail -s "Test Mail" lij@us.ibm.com < lij>         mail -s "SSA disks re-configuration" dluby@us.ibm.com,wombat2@us.ibm.com,lij@us.ibm.com < lijRemarks>         mail -s "make.out.3" dgm69@us.ibm.com,lij@us.ibm.com < make>         mail -s "readme" dvelarde@us.ibm.com make          ## Maintains, updates, and regenerates groups of programs. Execute makefile
        make depends  ## compile website2.3 code
man            ## Displays manual entries online.
        man read
mkdir

        ## Creates one or more new directories.
        mkdir C_prog
        mkdir -p /tmp/log
mk_initrd; lilo    ## reload and update Linux kernel, important step after Linux Patch applied.
more or page    ## Displays the contents of files one screen at a time.
mount         ## Makes a file system available for use. 

        mount -t iso9660 -o ro,loop=/dev/loop0 [iso_flie] /mnt  # To mount an ISO image on Linux
        mount nimbus:/resources/lppsource/510 /mnt
        mount /cdrom
        view /etc/fstab
        mount /media/cdrecorder
        eject  ## eject CD rom
mv              ## Moves files.
        mv lij lij.`date +"%d%h%y"`

N

netstat -i     ##  give internet status.
netstat -rn    ##  give internet status.
netstat -in 

# Some nfs stuff:

        http://sdb.suse.de/en/sdb/html/rschmid_slesnfs.html   ## SLES 8 nfs install
        rcnfsserver start
        rcnfslock start
        rcnfsserver start
        rcnfsserver status
        mount -o loop /path_to_iso/iso_file /mnt/cdrom  ## to work with iso file
        1. on delivery server, I did "mount -o loop /sles8/Unitedlinux1.0_sp1/UnitedLinux-1.0-SP-1-i386-RC7.iso /media/cdrom
            (off course, I did "mkdir -p /media/cdrom" first)
        2. Added "/media/cdrom 192.168.10.0/255.255.255.0(ro,sysn) 10.1.1.0/255.255.255.0(ro,sync) in /etc/exports file
        3. rcnfsserver stop;rcnfsserver start ## restarted my nfs server
        4. On my target machine, mkdir -p /media/cdrom; also started nfs server
        5. mount 192.168.10.254:/media/cdrom /media/cdrom
        6. On target machine, cd /media/cdrom;./install_update_rpms.sh

nice                                       ## Runs a command at a lower or higher priority
nohup                                   ## Runs a command without hangups.

O

## No commands found here yet.

P

passwd                   ## changes a user's password
paste                       ## Joins lines from one or more files.
ping      ## ping a system
        ping -s 216 c360-6m1_2
        ping -s 217 c360-6m1_2
        ping -s 218 c360-6m1_2
        ifconfig en0
        traceroute c360cw
        ping loopback
        ping -f loopback
        ping -f -s 1000 loopback
printf                         ## Writes formatted output.
ps                             ## Shows current status of processes.
ps -ef
ps -fu tpcd

Q

## No commands here yet

R

rcp                          ## remote copy: Transfers files between a local and a remote host or between two remote hosts.
read                        ## Reads one line from standard input.
reboot                    ## Restarts the system.
rlogin                     ## rsh, remote login
route                      ## reports network routing table values
rpm -Uvh       ## Install Linux packages
        rpm -qa |grep -i gd
        cd /cdrom/suse/images
        rpm --root /mnt -e k_smp ## (to remove the SMP kernel)
        rpm --root /mnt -i k_deflt.rpm  ## (to install the default kernel -UP)
        rpm -e ibmj2ee    ## erase ibmj2ee.rpm package
        rpm -i ibmj2ee     ## install ibmj2ee.rpm package 
        rpm -q -i -p $rpm
        rpm -e --nodeps openldap2-client
        rpm -q -f /usr/IBMdb2/V7.1/cfg/db2udbee.lic

rm                         ## remove a file
rmdir

            ## dir must be empty
rpcinfo                  ## Reports the status of Remote Procedure Call (RPC) servers.
rsh

S

## Enable serial login: To enable login over serial port uncomment the following line in /etc/inittab
## S0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt102
sed                       ## Provides a stream editor.
        vg1=`sed -n "1p" $diskfile`
        vg2=`sed -n "2p" $diskfile`
        vg3=`sed -n "3p" $diskfile`
        vg4=`sed -n "4p" $diskfile`
        Change the "cp" to "sed -ne '1,$p'" for all the .rs files under /opt/IBMJ2EE  to remove line one.

set -o vi             ## set commands retrieval in vi mode
shutdown now  ## shut down system
size                      ## Displays the section sizes of the Extended Common Object File Format (XCOFF) object files.
sleep                    ## Suspends execution for an interval.
sort                     ## Sorts files
ssh -l jli gnulinux.austin.ibm,com   ## login using secure shell   
        ssh_run -l root "ssh -l root \"cat $IBMJ2EE_CONF\" "

stat                        ## get the time stamps of a file
su - junshan           ## Switch user
    su - dasusr1 -c "db2admin stop" 2> /dev/null
    su - db2inst1 -c "db2stop" 2> /dev/null
sum ibmj2ee.tgz     ## Get a file's signature
sync                      ## Updates the i-node table and writes buffered files to the hard disk.

T

tail                      ## Writes a file to standard output, beginning at a specified point.
        tail -f nohup.out
        tail -f /var/log/messages
talk                    ## Converse with another user.
tar                     ##  Manipulates archives. 
        tar xvf ../C48TJML.tar -C .  ## tar to current directory

        tar -cvf xyz.tar xyzDir  ## make the directory xyzDir into a tar file
        tar -xvf xyz.tar             ## untar the tar file
        tar xfz [file].gz            ## untar a gz file
        tar xfj [file].bz2          ## untar a bz2 file
tcpdump -s600 -i en0
tee                     ## Displays the output of a program and copies it into a file.
tn, telnet            ## Connects the local host with a remote host, using the Telnet interface.
test                    ## Evaluates conditional expressions.
time                   ## Prints the time of the execution of a command.
touch                 ## Updates the access and modification times of a file.
tr                        ## Translates characters.
traceroute c360cw
true or false          ## Returns an exit value of zero (true) or a nonzero exit value (false).
tty                        ## Writes to standard output the full path name of your terminal.

U

ulimit -a                ## check user limits.  To change the ulimits, vi /etc/system/limits, re-login.
umask                  ## Displays or sets the file mode creation mask.
umount or unmount  ## Unmounts a previously mounted file system, directory, or file.
unalias                  ## Removes alias definitions.
uname                  ## Displays the name of the current operating system.
uniq                     ## Reports or deletes repeated lines in a file.
unzip                    ##  unzip .zip files
        unzip ExpressLinux_20021207_GA.zip -d cdrom  ## unzip to cdrom directory
uptime                  ##  Display the uptime of the system

V

vi                          ## a visual editor
        ## regular expressions: substitute from " on " to the end of line:
        'a,'b s/ on \([a-z0-9., ()_]*\)//g
        'a,'b s/ on \([a-z0-9., ()_]*\);$/;/g
        vi /etc/resolv.conf
        vi /etc/hosts
        vi /etc/lilo.conf 
        vi /etc/services /etc/inittab
  
view                     ## read only vi
vim                       ## a variant of vi
vmstat                  ## reports system status
        vmstat 1
        vmstat -s | more   ## Reports virtual memory statistics.

W

w                       ## Prints a summary of current system activity.
wait                   ## Waits until the termination of a process ID.
wall                    ## Writes a message to all users that are logged in. 

# wasadmin.sh stuff:
        set varMap [$AdminConfig getid /Cell:/Node:/Server:/VariableMap:/]
        $AdminConfig showall $varMap
        $AdminConfig defaults WAS40DataSource
        /opt/IBM/WebSphere/Express/AppServer/bin/wsadmin.sh
        # DB2_JDBC_DRIVER_PATH   /home/db2inst1/sqllib/java12

WAS Express Commands:

        ./setupLinux -is:silent -silent -P toolsBean.active=False -P siteDevComponentBeanLinux.active="false"
        /opt/IBM/WebSphere/Express/AppServer/bin/stopServer.sh server1

        http://9.117.148.148:7090/admin/  
             
wc                      ## Counts the number of lines, words, and bytes or characters in a file.
wget http://blueice.austin.ibm.com/raw/i386/was/5.0/express/linux.daily.we-5.0.GM.zip
what           ## Displays identifying information in files.
whereis                ## Locates source, binary, or manual for program.
whereis cc          ## Locate c compiler
which xlC
who
whoami

XYZ

xhost +ppsclnt9.pok.ibm.com
    xhost + localhost  # from user to get root to display GUI

xsltproc -o website-internal.html website.xsl website.xml   ## create html through xml using Website2.3
yast
yast1
yast2                      ## Yet Another System.  From SuSe Linux
yes                        ## Give affirmative response to a command
        time yes| fsck /rawdata00007
zcat                       ## Expands a compressed file to standard output.
zic -l [timezone]    ## Set up time zone on Linux. example: [timezone] = US/Eastern