hp-ux下的一些常用命令

husthxd發表於2005-02-07

今天總結了一下hp-ux平臺下一些dba常用命令.


-- 用dd檢驗儲存的io能力
#sar -d 2 5
#dd if=/dev/rdsk/c31t0d0 of=/dev/null
#ioscan -fnkCdisk


prompt -- kill all oracle background processes when you can't shutdown the db
ps -ef|grep "ora_"|grep -v grep|grep $ORACLE_SID|awk '{ print $2 }'|xargs kill -9
alias show_ora_process="script"

prompt -- search the file that contains the string 'x'
find . -print|xargs grep -i x

prompt -- hu-unix的命令
prompt -- glance/top/sar -u/sar -w/sar -b/vmstat /w/iostat
list recently touched files :

ls -alt|head

list recently changed files :

ls -alc|head


display file size in 512k :

du -s *|sort -n | tail


-- locate files that contain certain strings :

find . -print|xargs grep -i v$session


-- find recently created files :

find . -mtime -1 -print


-- find large files on a server :

find . -size +100000 -print

-- Disk management :

df -k/bdf

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/6906/viewspace-21720/,如需轉載,請註明出處,否則將追究法律責任。

相關文章