Archive for August, 2007

Unix Reqular Expressions Reference

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Regular Expressions Reference Sheet ----------------------------------- Ctr     Definition                                                      ---     ----------                                                      ^       The pattern has to appear at the beginning of a string.         $       The pattern has to appear at the end of a string.               .       Matches any character.                                          []      Bracket expression. Matches one of any characters enclosed.     [^]     Negates a bracket expression. Matches ...

Unix grep Command Notes and Examples

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org grep command notes and examples ------------------------------- grep [options] 'pattern' [file ...] Option  Description ------  ----------- -i      Ignore upper/lower case distinction. -n      Print matched lines and their line numbers. -c      Print only a count of the matching lines. -l      Print names of files with matching lines but not the lines. -h      Print matching lines ...

Unix Find Command Notes and Examples

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org find command notes and examples ------------------------------- find <where-to-look> <criteria< <what-to-do> There are several options for matching criteria: -atime n        File was accessed n days ago -mtime n        File was modified n days ago -size n         File is n blocks big (a block is 512 bytes) -type c         Specifies file type: f=plain ...

Unix CVS Basics

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org cvs basics ---------- remote settings on client (for tcsh) setenv CVSROOT ":ext:username@192.168.1.188:/usr/local/cvsroot"  # <<path to cvsroot on remote server setenv CVSEDITOR vi setenv CVS_RSH ssh ------------------------------------------------------------------- cvs import -m "comments" projectname CVS_VENDOR_TAG CVS_RELEASE_TAG cvs checkout projectname cvs update projectname cvs commit -m " message" projectname cvs release -d projectname cvs status projectname cvs log projectname cvs checkout -r ...

Unix Cron Basics

Tuesday, August 7th, 2007

Tip courtesy of Kyle Reynolds at http://www.camelrichard.org An entry in cron is made up of a series of fields, much like the /etc/passwd file is, but in the crontab they are separated by a space. There are normally seven fields in one entry. The fields are: minute hour dom month dow user cmd minute  This ...

Unix AWK Examples

Tuesday, August 7th, 2007

Tip courtesy of Kyle Reynolds at http://www.camelrichard.org extract third field separated by space -------------------------------------- awk '{ print $3 }' extract third field separated by tab ------------------------------------ awk -F'\t' '{ print $3 }' extract lines where third field is "111" separated by tab --------------------------------------------------------- awk -F'\t' '($3=="111")' extract third field where the second field is "1957" ---------------------------------------------------- awk '($2=="1957") { print $3 }'

Veritas Volume Manager Command Line Examples

Tuesday, August 7th, 2007

Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Volume Manager CLI examples: --------------------------- display disk listings:         # vxdisk list display volume manager object listings         # vxprint -ht display free space in a disk group              # vxdg -g <diskgroup> free         list all volume manager tasks currently running on the system           # vxtask list add a disk to Volume Manager ...

Solaris Limit Processes per User

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org  To limit processes per user /etc/system set maxuprc = number

How to Tell if Solaris is Configured For 32 or 64 Bit

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org If Solaris has been configured for 32 bit, the output of: isainfo -v   will be: 32-bit sparc applications ---- If Solaris has been configured for 64 bit, the output of: isainfo -v   will be: 64-bit sparcv9 applications 32-bit sparc applications ---- OR: isainfo -b will return either 32 or 64

How to Change IP and Hostname on a Solaris Box

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Change in the following files: ----------------------------- /etc/hosts /etc/netmasks /etc/defaultrouter /etc/hostname.(hme0)     >> type of network card specific /etc/nodename /etc/net/*/hosts /etc/passwd ----------------------------- **        rename the directory under /var/crash to match your new hostname ** &&        type hostname to view hostname &&        type hostname <newhostname> to change name without reboot To bind an IP address to a Network Interface Card   ...