摘要:#查找关键字 Hello /Hello #vim忽略字母大小写匹配 /hello\c #显示行号 :set nu #跳转到 第120行 :120 #保存并退出 wq #退出不保存 q! #拷贝 yy #粘贴 p shift+g #跳转到 末尾 ctrl+b #向上 ctrl+f #向下
阅读全文
posted @ 2017-03-06 22:22
绿Z
文章分类 - shell
摘要:#查找关键字 Hello /Hello #vim忽略字母大小写匹配 /hello\c #显示行号 :set nu #跳转到 第120行 :120 #保存并退出 wq #退出不保存 q! #拷贝 yy #粘贴 p shift+g #跳转到 末尾 ctrl+b #向上 ctrl+f #向下
阅读全文
posted @ 2017-03-06 22:22
摘要:#查找某个用户的进程 ps -u <user> -f 或者 su - <user> ps-x #查看 目录的进程 ps -ef|grep `pwd` #查看 cpu 使用 top #查看进程路径 pwdx <PID> #查看进程路径 pwdx <PID>
阅读全文
摘要:shell连接oracle数据库执行sql语句: 1.sqlplus + 写tnsnames.ora:支持 oracle rac 【jdbc.properties】 jdbc.properties文件部分信息: jdbc.driver = oracle.jdbc.driver.OracleDrive
阅读全文
posted @ 2017-03-06 22:09
摘要:#设置文件,目录默认创建权限 umask umask 0122 mkdir test_dir touch test_file
阅读全文
posted @ 2017-03-06 22:02
摘要:1.查看历史操作命令 history cat ~/.bash_history 2.删除历史操作命令 history -c true > cat ~/.bash_history 3.设置为不记录历史操作命令 vim /etc/profile 修改 HISTSIZE=0(默认 HISTSIZE=1000
阅读全文
posted @ 2017-03-04 19:47
摘要:#kill 与 pkill kill -9 <pid> kill -9 -1 #杀掉当前用户下所有进程,root用户下慎用 pkill -kill -t pts/0
阅读全文
posted @ 2017-03-04 19:46
摘要:sed --help sed -i "0,4"d test.log 1.sed 与 sed -i 的区别 2.模式串 使用 双引号 与 单引号 的区别
阅读全文
posted @ 2017-03-04 19:45
摘要:su --help su - oracle -c 'echo $ORACLE_HOME' #该su命令并不会切换用户,但是会得到指定用户下命令的返回结果
阅读全文
posted @ 2017-03-04 19:43
摘要:shell交互入参: #### #### function main{ echo "sqlplus username/passwd@ynsname" read -p "please input username:"dbuser read -p "please input passwd:"-s dbp
阅读全文
posted @ 2017-03-04 19:41
摘要:shell执行oracle的sql文件:oracle的sql文件可以嵌套执行sql文件。 【create.sql】注意sql文件编码为UTF8与数据库字符集相同 create table tab01( c1 varchar2(6), c2 number(38) ) ; comment on tabl
阅读全文
posted @ 2017-03-04 19:40
摘要:bash执行gaussdb的sql文件:sql文件可以嵌套执行sql文件。 【create.sql】注意sql文件编码为UTF8与数据库字符集相同 create table tab01( c1 varchar2(6), c2 number(38) ) ; comment on table tab01
阅读全文
posted @ 2017-03-04 19:39
摘要:bash执行db2的sql文件:sql文件不能嵌套执行sql文件。 【ssMgr/create.sql】注意sql文件编码为ISO-8859与数据库字符集IBM-eucCN相同 create table tab01( c1 varchar(6), c2 decimal(31) ) in tbs_ss
阅读全文
posted @ 2017-03-04 19:37
|