Sunday, 6 July 2008

Some useful unix commands

removing all trc files:
find . -name "*.trc" -exec rm {} \;

In AIX server log files are as follows:
1) /var/adm/wtmp this is binary file use following command to read it /usr/lib/acct/fwtmp fast shutdown and reboot
svmon -G

memory issues :
#!/bin/ksh
[[ -z $1 ]] && count=10 count=$1ps gxu grep PID grep -v grep
ps gxu /usr/bin/sort -k 4.0,5r grep -v PID head -n $count

ps aux head -1; ps aux sort -rn +3 head
svmon -Put 5

finding file :
find /-name 'filename'

iostat 4 5
sar -u 1 10 -->cpu
sar -u 10 8
sar -d 5 2 ->io


ioscan -fn
tar -cvf /dev/rmt/c2t5dOBEST /tmp
tar -xvf sample.tar ->open sample.tar
tar -tvf sample.tar ->show sample.tar
tar -cf sample.tar /home/../.. put everythıng ınto one file(no compress)

No comments: