[Linux] x-manager 连接linux桌面
x-manager 安装之后会有 Xbrowser 这个选项右键 new --> xstart sessionsession:输入一个名字host: 172.16.99.35 #输入ip protocol: SSH username: rootpassword: root的密码execution...
[Oracle] crsctl stat res -t
oracle10g的时候查看resource用 crs_stat -t比较多.到了oracle11g后查看resource 用 crsctl stat res -t[root@xxxxxdb2 ~]# crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STA...
[Linux] Mount windows共享给linux使用
mount windows共享磁盘给linux使用[root@oracle etc]# mount -t cifs -o username=administrator,password='xxxxxxxx' //172.16.xx.xx/software /mnt/fs3[root@oracle fs3]# dfFilesystem 1K-blocks Used Available Use% ...
[Linux] PV,VG,LV相关
2016.5.21pv,vg,lv[root@iphone dev]# rpm -qa | grep lvmlvm2-2.02.98-9.el6.x86_64lvm2-libs-2.02.98-9.el6.x86_641.pvcreate --physical volume create[root@iphone dev]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created[root@iphone dev]# pvcreate /dev/sdc Physic...
[Oracle] Raw device上Create Tablespace
[root@iphone ~]# vgdisplay vg00 --- Volume group --- VG Name vg00 System ID Format &nb...
[Shell] awk初学之常见问题
awk初学之常见问题 (转载)http://bbs.chinaunix.net/thread-2309494-1-1.html1. awk ‘{code}1’ 中的“1”是干什么的?一个完整的awk语句为:Awk ‘[patten]{action}……’, 其中pattern缺省为1,action缺省为{print}.那么awk ‘1’完整的写法就是awk ‘1{print}’; 同理,awk ‘{print}’完整的写法也是awk ‘...
[Shell] 99乘法表
打印9*9乘法表[root@oracle6 ~]# awk 'BEGIN{for(i=1;i
[Shell] 把连续多个空格变成单个空格
把连续多个空格变成单个空格的几个方法:[root@oracle6 ~]# echo "a b c d" | sed 's/[ ][ ]*/ /g'a b c d[root@oracle6 ~]# echo "a b c d" | awk '{$1=$1;print}'a b c d[root@oracle6 ~]# echo "a b &...
[Shell] awk 实现列转行例子
awk 实现列转行例子(收藏下)[/tmp/test]# cat tt31 2 3 4 5 6 72 3 4 5 6 7 13 4 5 6 7 1 24 5 6 7 1 2 35 6 7 1 2 3 4[/tmp/test]# awk '{maxnf=NF;maxnr=NR;for(i=1;i<=NF;i++) a[NR,i]=$i}END{for(i=1;i<=maxnf;i++){for(j=maxnr;j>=0;j--) printf a[j,i]" ";printf "\n"}}' tt35 4 3 2 1 6 5 4 3 2 &...
[Shell] awk 数组(2)
参考http://bbs.chinaunix.net/thread-2312439-1-1.html1.建立数组array[index] = value 数组名array,下标index以及相应的值value。[/tmp/test]# awk 'BEGIN{a[1]="a";a[2]="b";for(i in a)print i"="a[i]}'2=b1=a2.读取数组[/tmp/test]# awk 'BEGIN{a[1]=1;a[2]=2;a[3]=3;for(i in a)print i"="a[...
[Shell] awk $1=$1
$1=$1 是用来激活$0的重新赋值,也就是说 字段$1...和字段数NF的改变会促使awk重新计算$0的值,通常是在改变OFS后而需要输出$0时这样做 echo "A B C D" | awk '{OFS="|";print $0;$1=$1;print $0;}' A B C D A|B|C|D 即使OFS放在BEGIN里,也没有用 ...
[Shell] awk 统计分组数据
论坛上看到的统计数据的例子,自己测试一下.http://bbs.chinaunix.net/thread-4244399-1-1.html0.2 0.3 0.5 10.3 0.1 0.2 30.4 0.2 0.3 10.2 0.2 0.2 20.3 &nb...
[Shell] get after|before year,month,day,week,hour,minute,second
year[root@oracle ~]# date;date -d "1year"Tue Mar 8 23:45:18 CST 2016Wed Mar 8 23:45:18 CST 2017[root@oracle ~]# date;date -d "-1year"Tue Mar 8 23:45:25 CST 2016Sun Mar 8 23:45:25 CST 2015month[root@oracle ~]# date;date -d "-1month"Tue Mar 8 23:46:44 CST 2016M...
[Shell] awk-合并文本内容(join)
在论坛上看到的问题,记录下[/tmp/test]# cat tt6aa 1 2bb 2 3cc 3 4[/tmp/test]# cat tt7aa 2 1bb 8 2cc 4 4dd 5 5想将tt6,tt7内容合并为cc 3 4 4 4aa 1 2 2 1bb 2 3 8 2最开始想到到awk将两个文本的内...
[Shell] awk 数组(1)
在论坛上看到的问题,将tt6中的第三列的内容替换为tt5中的内容,关联列是tt5的第一列和tt6的第六列[/tmp/test]# cat tt5 Z82004A 70Z82004B 70Zxxxb 70Z7D009B 70ZKH919C ...
[Shell] awk 去除文本的第一行和最后一行
在论坛上看到了关于awk的例子,记录下来awk 去除文本的第一行和最后一行[/tmp/test]# cat tt2 | grep -n ""1:555-05422:555-12343:555-16754:555-21275:555-29126:555-34127:555-34308:555-55539:555-648010:555-669911:555-768512:555-8971[/tmp/test]# cat tt2 | awk 'NR>2{print p}{p=$0}' &nb...
[Shell] awk学习(4)-read input file
NR,FNR,NF的定义在 http://blog.itpub.net/24237320/viewspace-2072968/FS,OFS,RS,ORS的定义在 http://blog.itpub.net/24237320/viewspace-2062456/下面为其他的情况或者例子1.更改field后,print内容会有发生变化[/tmp/test]# awk '{print $2;$2=$2-10;print $0}' ff2 #$2发...
[Shell] Monitor other host oracle instance alert.log and mail
自己写的每隔一分钟检测其他other hosth上的oracle instance的alert.log文件是否有错误,如果有错误,则mail出来。有很多地方没有考虑到以后多加改善1.other host's script[mon@oracle source]$ more mon_alert_log #!/bin/bashalertlog=/u01/oracle/diag/rdbms/yangxu/yangxu/trace/alert_yangxu.logdatetime=`dat...
9.Monitor other host oracle instance alert.log and mail
自己写的每隔一分钟检测其他other hosth上的oracle instance的alert.log文件是否有错误,如果有错误,则mail出来。有很多地方没有考虑到以后多加改善1.other host's script[mon@oracle source]$ more mon_alert_log #!/bin/bashalertlog=/u01/oracle/diag/rdbms/yangxu/yangxu/trace/alert_yangxu.logdatetime=`dat...
svchost.exe占用很高的内存
笔记本重新重装系统后,开启机器没有多久后,svchost.exec占用很高的内存baidu后发现服务中关闭superfetch服务后svchost.exe占用的内存降了下来。没有过多久svchost.exec又占用很高的内存之后关闭Windows update服务后(禁止服务启动),内存使用率降了下来...