netstat 命令详解netstat用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。常用:netstat -anp | grep 进程名、pid进程号、端口号参数一般用的:-aup-anp-anltp-ano参数含义介绍-a (all)显示所有连接...
分类:
Web程序 时间:
2014-07-02 09:57:25
阅读次数:
387
ls -LS 按照大小降序排列ls -l |sort -n -k5 按照大小升序ls -lrt 按照时间降序ls -lnt 按照时间升序ls -l|grep -v "^d" 只显示文件ls -l -d */ 只显示目录ls -l |sort -k9 按照文件名称升序ls -lr 按照文件名降序ls ...
分类:
系统相关 时间:
2014-07-01 21:42:50
阅读次数:
277
检查系统是否安装snmp服务
# rpm -qa|grep snmp
net-snmp-5.3.2.2-17.el5
net-snmp-perl-5.3.2.2-17.el5
net-snmp-devel-5.3.2.2-17.el5
net-snmp-libs-5.3.2.2-17.el5
net-snmp-utils-5.3.2.2-17.el5
net-snmp-libs-5....
分类:
系统相关 时间:
2014-07-01 16:01:00
阅读次数:
386
1.写一个shell脚本test.sh,重新启动tomcat[java]view plaincopy#!/bin/sh./etc/profilepid=`psaux|greptomcat|grep-vgrep|grep-vretomcat|awk'{print$2}'`echo$pidif[-n"$...
分类:
系统相关 时间:
2014-07-01 12:08:38
阅读次数:
304
一个程序所依赖的库文件可以由:ldd命令路径来显示例ldd/bin/cat输出详解第一行输出为库入口,非库文件whichls|grep-valias|grep-o‘[^[:space:]]*‘脚本中调试方法declare–iDebuglevel=1Debuglevel={0|1}[$Debuglevel–eq1]&&echo…$…….移植脚本如下所示#!/bin/bash#..
分类:
系统相关 时间:
2014-07-01 06:06:30
阅读次数:
383
自动化格式分区方法----非交互---可用于脚本要先给用户一个提示,让他选择一个分区来格式化foriin`mount|grep“/dev/sdb”|awk’{print$1}’`dofuser–km$i;umount$idoneddif=/dev/zeroof=$PartDiskbs=512count=1sync;sleep3echo‘np1+20Mnp2+512Mnp3+128Mt382w’|fdisk/dev/s..
分类:
系统相关 时间:
2014-07-01 06:00:36
阅读次数:
359
start.shJava代码#!/usr/bin/bash##start.sh#@auth:zhoulin@lianchuang.com#SERVER_STATUS(){serv_status=`ps-ef|grepweblogic|grepwebapp|grep-vgrep|grep$1|wc-l...
分类:
Web程序 时间:
2014-06-30 23:05:20
阅读次数:
578
在启动apache服务的时候(service httpd start 启动)出现这个问题。出现这个问题,是因为APACHE的默认端口被占用的缘故.解决方法就是把这个端口占用的程序占用的端口去掉。使用命令:netstat -lnp|grep 80 查看80端口使用如:tcp 0 0 0.0.0.0:8...
分类:
其他好文 时间:
2014-06-30 22:06:35
阅读次数:
319
shell之文本过滤(grep)分类:linux shell脚本学习2012-09-14 14:17588人阅读评论(0)收藏举报shell正则表达式扩展工具存储grep(全局正则表达式版本)允许对文本文件进行模式查找。如果找到匹配模式, grep打印包含模式的所有行。grep支持基本正则表达式,也...
分类:
其他好文 时间:
2014-06-30 20:47:27
阅读次数:
192
环境是AIX 6.1,DB2版本9.7.0.7
首先查看db2主进程是否存在
ps -ef|grep db2sys
若不存在使用db2start打开数据库
备份介质为冷备数据源,
cd 到介质所在目录下:
cd /home/db2inst1/backup
使用redirect参数来更改目录:
1.>db2 restore db xxx from . ...
分类:
数据库 时间:
2014-06-30 16:25:45
阅读次数:
459