# This is the default standard profile provided to the user ab86643 (previous 17714)
#
MAIL=/usr/mail/${LOGNAME:?}
echo "Kill character set to Control-U"
stty kill §
PS1="\$PWD> "
export PS1
EDITOR=vi
export EDITOR
TERM=vt100
export TERM
alias l='ls'
alias ll='ls -la'
PATH=$PATH:/usr/bin/X11:/opt/informix/bin:/usr/bin/wt
export PATH
DISPLAY=:0.0
export DISPLAY
case `/bin/tty` in
*nty*)
echo "\n\n TCP/IP CONNECTION\n\n"
TERM=vt100 export TERM
DISPLAY=135.133.11.80:0
export DISPLAY
break;;
*console*)
echo "\n\n DIRECT CONNECTION\n\n"
TERM=AT386 export TERM
DISPLAY=os3345:0
export DISPLAY
echo "E N A B L I N G V I R T U A L T E R M I N A L S\n\n"
vtlmgr
esac
# /usr/bin/X11/nwinnewuser
#
#
# This .profile assumes the standard engine will be used.
# To change to the turbo engine set:
# SQLEXEC=/opt/informix/lib/sqlexec
#
INFORMIXDIR=/opt/informix
#PATH=.:/opt/informix/bin:/usr/bin/wt:/sbin:/usr/sbin:/usr/bin:/etc:/usr/ccs/bin:/usr/bin/X11
SQLEXEC=/opt/informix/lib/sqlturbo
TERMCAP=/opt/informix/etc/termcap
#TERM=vt100
export INFORMIXDIR PATH SQLEXEC TERMCAP TERM
#
#
# -----------------------------------------------------------------------
# check /etc/default/msdos
# doscp -m /etc/inittab c:/
# dosdir c:
# dosrm c:/inittab
# -----------------------------------------------------------------------
# /usr/bin/X11/xsetroot -bitmap /usr/include/X11/bitmaps/grid16 -fg green -bg yellow
# /usr/bin/X11/xsetbg /home/ab/gif/blastoff.gif
#
# ALTERNATIVE: use "xloadimage"
# -----------------------------------------------------------------------
# STRTRESH 8388608 per 32 Mb RAM
# SHMMAX 2097152 per 32 Mb RAM
# -----------------------------------------------------------------------
# pkgtrans /tmp ctape1 ild tty
# -----------------------------------------------------------------------
# Enter maintenance mode; then execute the following:
# mount -F ufs /dev/root /mnt
# cp /mnt/usr/lib/fs/ufs/tunefs .
# umount /mnt
# tunefs -m 5 /dev/root
# rm tunefs
# sync
# <ctrl> d
---------------------------------------------------------
MOUNTING MANUALLY CD ROM
/etc/init.d/volmgt stop (in case)
mkdir /pcfs
mount -o ro -F hsfs /dev/dsk/c0t6d0s2 /mountpoint
# -----------------------------------------------------------------------
# SINTASSI COMANDO SU
#
# su - root -c "ls"
#
# -----------------------------------------------------------------------
#
# /usr/bin/X11/giftoppm lake.gif > lake.ppm
# /usr/bin/X11/ppmtopcx lake.ppm > lake.pcx
# Il file keyb.ita va installato nella directory "/usr/lib/keyboard"
# ADD THE FOLLOWING LINES AT THE END OF /ETC/PROFILE
#if [ `/bin/tty` = "/dev/console" ] ; then
# stty -istrip cs8
# /usr/bin/mapkey -V /usr/lib/keyboard/keyb.ita
#fi
# U S E F U L S T U F F
#
foo() {
cat <<-X
this is bull
X
return 0
}
#
# P R I N T E R S
#
# lp -d printer -T postscript <file-name>
# lpadmin -p printer -v /dev/null
# lpstat -p printer -l
#
# ----------- T A R O P T I O N S -----------------
#
# tar -cvf /dev/rdsk/f0t *
# tar -cvf /dev/rmt/c0t3d0s0 *
# tar -xvf /dev/rmt/c0t3d0s0 to restore (senza * quindi)
# use "k" for multivolume
# use "x" to restore
# use "t" to see containt
tar -xf tarfile (if restoring from a file)
l'opzione -f permette di ridefinire l'input. Per default
cerca di restorare da "/dev/rmt/0".
Look at "/etc/default/tar" come file di configurazione
# possibility to set blocking factor (option ....)
#
# -------------- T C O P Y ---------------------------
#
# tcopy [src] [dest]
# you have to do a "touch dest" first
# example : touch y; tcopy /dev/rmt/0 y
#
#
# -------------------- M K F S, n e w f s O P T I O N S -----------
# first format, partition and label the disk to add:
# use "format" utility and inside it "partition" first, then "label" ("print" to check).
#
# mkfs -F ufs -o ntrack=17,bsize=8192,rps=90 /dev/rdsk/c0t5d0s2 200000
#
# newfs /dev/rdsk/c0t1d0s0 /* to create a ufs F.S. (doesn't need any option) */
# edit /etc/vfstab to get an automatic mount at startup, eventually add /swap
#
#--------------------------------------------------------------------------------------
# uuencode unix unix > file
# sintassi is: uuencode (binary file) (label) > (outputfile)
#----------------------------------------------------------
# tt07:1:respawn:/usr/lib/saf/ttymon -g -d /dev/term/s07 -t60 -l9600
#
# U S E F U L O P T I O N S F O R F I N D
#
# find / \( -name core -o -name '*~' -o -name '.CKP*' \) -atime +1 -exec rm {} \;
find . -print -exec
sum {} \;
#
# CERCA UNA STRINGA ALL'interno di una sottodirectory
find . -print | xargs grep "string" {} \;
find . -print | xargs ls -l
#
#
# find . -print | cpio -ov | remsh panther "dd of=/dev/rmt/c0t4d0s0"
# For "remsh" check : /etc/hosts, /etc/hosts.equiv, $HOME/.rhosts
# insert 3 lines like these:
# itwinp
# itwinp.italy.ncr.com
# itwinp.Italy.NCR.COM
#
#
# echo "nohup a.out &" | at 15.00 TODAY
#
# at -f /usr/bin/zarpellon 15.00 TODAY
#
# ftp panther << EOF
# user root £££££
# get miofile
# close
# bye
# EOF
#
#------------------ A W K ---------------------------------------
#
# ps -l | awk '{print $1,$4}' (TAB o blank come separatore di campo)
# ps -l | awk -Fs '{print $1,$4}' ("s" come separatore di campo)
# ps -efc | grep lotus | awk '{print $2}' | sort -r
# kill -9 `ps -efc | grep -v sh | awk '{print $2}' | sort -r`
# ps -l | awk -Fs '{print $1,$4}' ("s" come separatore di campo)
#
#------------------ S E D ---------------------------------------
#
# cat file | sed -e /'FRANCO'/d (cerca la linea contenente la stringa FRANCO e la rimuove)
#
#----------------- P R I O C N T L ------------------------------------
#
# priocntl -s -c RT -p 12 -i pid 16822
# (the above cmd canges to RT class, pri 112, the process with pid 16822
#
# priocntl -e -c RT -p 14 sh
# (the above cmd executes the command "sh" at RT priority 114
#----------------------------------------------------------------------
rpm --install ./telnet.rpm
COMANDO LINUX PER INSTALLARE PACCHETTI (EQUIVALENTE A PKGADD)
---------------------------------------------------------------
SIMBOLIK LINK
no existing directory;
mkdir /export/azbg0/uno
ln -s /export/azbg0/uno /usr/due
try to: "ls -l /usr"
IMPORTANT !!! : use absolute path
#----------------------------------------------------------------------
# READING DOS FLEXES
/etc/init.d/volmgt stop (in case)
mkdir /pcfs
mount -F pcfs /dev/diskette /pcfs
cp /etc/group /pcfs /* copia file su flex in formato DOS */
check manual con man pcfs
------------------------------------------------------
dd if=elenco of=elenco2 ibs=1 count=121
genera un file elenco2 con i primi 121 caratteri del file elenco
This is useful to split large files then recompat them
on multiple diskettes (DOS files for instance)
ex: splitting winword.exe on Unix
"dd if=winword.exe of=a bs=1400000 count=1"
"dd if=winword.exe of=b bs=1400000 count=1 skip=1"
"dd if=winword.exe of=c bs=1400000 count=1 skip=2"
To recompat on DOS system use:
copy /B a + b + c winword.exe
------------------------------------------------------
HOW TO ADD A SWAP FILE
mkfile 1g /disk2/pippo
swap -a /disk2/pippo
-----------------------------------------------------
vmstat 5 (statistics every five seconds),
vmstat -s (since last boot),
vmstat -S (swapping),
vmstat -c (cache flushing),
vmstat -i
iostat 5,
iostat -xtc (get extended disk statistics)
iostat -xn 30 (xn is specific Solaris 2.6 option) :
check if more then 5% busy and average resp. time > 30 ms.
***************************************************************
snoop options:
1) snoop -d /hme0 -o /tmp/file tcp
2) snoop -v -i /tmp/file | pg
***************************************************************
To check connected scsi: /etc/LGTOuscsi/inquire
**************************************************************
**************************************************************************
********** O R A C L E C O N S I D E R A T I O N S **********
La tablespace è una entità logica; una tablespace è formata da più
data file; nel caso di utilizzo su raw device un data file corrisponde
ad una slice; è quindi possibile aumentare la dimensione di una tablespace
semplicemente associandole dei data file aggiuntivi.
La riorganizzazione di una tablespace viene fatta attraverso una
attività di export ed import (verso nastro ad esempio) che può comunque
essere fatta on-line, senza cioè bloccare l'attività di lavoro.
Nel caso in cui invece ci sia disponibilità di spazio si può tenere un area
tampone come tablespace di parcheggio per l'export dei dati.
**************************************************************************
set msgsys:msginfo_msgmax = 65535
set shmsys:shminfo_shmmax=120485760
set lotsfree=0x800
set desfree=0x400
set minfree=0x200
Solaris printenv utility (da ok)
ok devalias /* verifica i nomi degli alias */
ok printenv /* verifica il valore della variabile in questione */
ok setenv variable_name newalias
/* un possibile variable_name potrebbe essere "bootdevice" */
ok help system /* per avere la sintassi dei comandi */
ok setenv auto-boot? false /* per non avere autoboot automatico */
to stop autoload sequence and go to "ok" type <STOP a>
---------------------------------------------------------------
ADDING FAST ETHERNET CONTROLLER:
Just add /etc/hostname.be0 (be1, be2, be3) and write inside the name
of the host (es. milan4).
Then init 0 and boot -r.
To setup network board run "ifconfig" with different option to set
IP address, netmask, metrics, etc.
Check file /etc/inet/netmask for default subnet mask (sintax is inside).
--------------------------------------------------------------
ADDING ROUTING ENTRIES ( check using netstat -r )
route add 193.70.244.0 199.228.206.101 2
this means: to go to 193.70.244.0 use 199.228.206.101 with metric 2.
il primo indirizzo è quello di una rete di classe C quindi significa:
" tutti i sistemi sulla rete 193.70.244 "
Lo scenario è quello di MLS in cui il router è il sistema AIX.
to add a default gateway look at /etc/rc2.d/S69inet
-------------------------------------------------------
ADDING ROUTING ENTRIES on WINDOWS SYSTEMS
route add 193.70.244.0 mask 255.255.255.0 199.228.206.101 metric 1
route add default gw 129.157.94.8 /* alternative: adding default router */
---------- TO CHECK BOARD SPEED ---------------
netstat -i (and check all values)
--------------------------------------------------------------------
ADDING AN ADDITIONAL VIRTUAL ADDRESS TO THE SAME ETHERNET nic
ifconfig hme0:1 inet 199.100.100.2 netmask 255.255.255.0
PER ATTIVARLA DARE
ifconfig hme0:1 up
PER DECONFIGURARLA DARE
ifconfig hme0:1 0.0.0.0 /* check with lumax ....)
-------------------------------
mailx -v oberdank@usa.net
...
.
/usr/lib/sendmail ....
--------------------------------------
/usr/dist/exe/gunzip ./file.Z
/usr/platform/sun4u/sbin/prtdiag -v /* to get hw configuration */
patchadd <dir name> /* to install patches on 2.7 *