(Oracle)使用 unix 命令
(Unix) To see errors from Alert log file
cd alertlogdirectory;
grep ORA- alertSID.log
To see the name of a user from his unix id (Provided your UNIX admin keeps
them!)
grep userid /etc/passwd
To see if port number 1521 is reserved for Oracle
grep 1521 /etc/services
To see the latest 20 lines in the Alert log file:
tail -20 alertSID.log
To see the first 20 lines in the Alert log file:
head -20 alertSID.log
To find a file named "whereare.you" under all sub-directories of /usr/oracle
find /usr/oracle -name whereare.you -print
To remove all the files under /usr/oracle which end with .tmp
find /usr/oracle -name "*.tmp" -print -exec rm -f {} \;
To list all files under /usr/oracle which are older than a week.
find /usr/oracle -mtime +7 -print
To list all files under /usr/oracle which are modified within a week.
find /usr/oracle -mtime -7 -print
To compress all files which end with .dmp and are more than 1 MB.
find /usr/oracle -size +1048576c -name "*.dmp" -print -exec compress {} \;
评论0
最新资源