LINUX
zjungle
这个作者很懒,什么都没留下…
展开
-
jstack命令做CPU分析
用jstack命令做CPU分析原创 2022-12-01 13:38:36 · 481 阅读 · 0 评论 -
linux安装ORACLE客户端
1、官网下载客户端安装文件http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.htmloracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpmoracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpmoracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm.原创 2021-07-30 10:29:14 · 599 阅读 · 0 评论 -
Linux常用命令
1、按磁盘空间占用大小排序以M为单位,按文件大小逆序(从大到小)排序,取前20个du -am /home/logs |sort -rn |sed -n "1,20p"2、判断参数变量是否为空-n “$file” 为参数file值的长度,变量不为空,即为trueif [ -n "$file"]then echo $fileelse "this is a null value"fi3、echo输出默认换行,echo -n 可以不换行输出,read 读入键盘输入的字符串到指定变量dbuse原创 2020-05-18 16:18:22 · 85 阅读 · 0 评论 -
Linux_重定向输入或输出
重定向输出比如一个测试文件:[root@localhost ~]$ cat testfilethis is a filethis is a test filethis is a test1 file">"1个大于指向符号,将左边结果输出到右边文件">>"2个大于指向符号,将左边结果追加输出到右边文件两者区别也就是一个会覆盖全内容,一个不覆盖仅追加[root...原创 2020-04-27 17:52:07 · 149 阅读 · 0 评论 -
Linux_SHELL脚本中的反引号`
Linux_SHELL脚本中的反引号(`)用反引号,将shell命令引起来,可以将命令的输出值赋给变量比如这里,date命令输出具体的时间[root@localhost ~]$ dateMon Apr 27 16:07:01 CST 2020那么我用反引号将命令完整的引起来,赋值给变量today,那我们可以输出这个变量,若无再次赋值,那这个变量值是不会改变的。[root@loca...原创 2020-04-27 16:39:22 · 8672 阅读 · 0 评论 -
linux_grep命令的用法
grep命令的用法grep:基于行的文本搜索工具#比如说,file的内容是:[root@localhost ~]$ cat filenamethis is a textline for testthis filename is filenamejust for Test基本用法# 比如 需要列出某文件中包含字符串'test'的行,命令:[root@localhost ~]$...原创 2020-04-27 14:52:34 · 220 阅读 · 0 评论 -
SHELL脚本sftp下载文件
实现效果:sftp远程登录服务器,获取文件,下载到本地,并删除远程端文件连接sftp利用私钥登录命令:sftp -oIdentityFile=私钥地址 -oPort=端口 用户名@ip# 如:sftp -oIdentityFile=/weblogic/ftppwdadr -oPort=57000 ftpuser@127.0.0.2#!/bin/bash# get all filena...原创 2020-04-26 19:56:37 · 2911 阅读 · 0 评论 -
数据库备份shell
#!/bin/sh#进入相应路径cd /home/oracle/tmp # The directory of exp dumpfiles location#指定数据库备份路径DMP_BAK=/home/oracle/tmp # The timestamp strings used by this scriptsTODAYDAT...原创 2020-04-26 19:31:24 · 150 阅读 · 0 评论