-
Linux下history命令详解---转载
所属栏目:[Linux] 日期:2021-02-06 热度:51
Linux下History命令主要用于显示历史指令记录内容,下达历史纪录中的指令 。 >History命令语法:[www.linuxidc.com@linux]# history [n][www.linuxidc.com@linux]# history [-c][www.linuxidc.com@linux]# history [-raw] histfiles 参数:n? :数字,要列出[详细]
-
Performing a thread dump in Linux or Windows--reference
所属栏目:[Linux] 日期:2021-02-06 热度:127
Linux/Unix 1. Find the Java/Tomcat process id. You should see output like this 2. Execute the following command to generate a thread dump Run this command every 5-10 seconds,5 times. 3.The thread dump is written to the standard output.?[详细]
-
字符串比较报错
所属栏目:[Linux] 日期:2021-02-06 热度:200
今天要归档日志时发现要排除当日的日志不能归档,gz -9 $filename 但发现没有--exclude 选项,故选择使用判断语句进行排除特定文件名。 但使用if ..then ..fi 判断字符串是否相等时报错: syntax error near unexpected token `then' 原因: if 与‘['之间[详细]
-
Linux ps aux指令詳解--转
所属栏目:[Linux] 日期:2021-02-06 热度:197
linux上进程有5种状态:1. 运行(正在运行或在运行队列中等待)2. 中断(休眠中,受阻,在等待某个条件的形成或接受到信号)3. 不可中断(收到信号不唤醒和不可运行,进程必须等待直到有中断发生)4. 僵死(进程已终止,但进程描述符存在,直到父进程调用wait4()调用后[详细]
-
Linux curl命令参数详解--转载
所属栏目:[Linux] 日期:2021-02-06 热度:180
副标题#e# div class="content" 一、Linux curl用法举例: 1. linux curl抓取网页: 抓取百度: div id="crayon-54ced3a098531297109663" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes crayon-wrapped" data-sett[详细]
-
/bin/bash^M: bad interpreter: 没有那个文件或目录--转载
所属栏目:[Linux] 日期:2021-02-06 热度:55
运行脚本时出现了这样一个错误,打开之后并没有找到所谓的^M,查了之后才知道原来是文件格式的问题,也就是linux和windows之间的不完全兼容。。。具体细节不管,如果验证:vim test.sh:set ff?如果出现fileforma=dos那么就基本可以确定是这个问题了。:set[详细]
-
Linux 精准获取进程pid--转
所属栏目:[Linux] 日期:2021-02-05 热度:74
如果想在脚本里只获取PID,那么可以用如下脚本。目前收集两种方法: 方法一 $ps x|grep xxx? |awk '{print $1}' e.g. ? ? ??ps x|grep java?|awk '{print $1}' 注释: ????? 1、xxx为执行的命令名称 ????? 2、举个例子,获取当前用户下的java进程 【pid】[详细]
-
Linux中date命令的各种实用方法--转载
所属栏目:[Linux] 日期:2021-02-05 热度:172
副标题#e# 在linux环境中,不管是编程还是其他维护,时间是必不可少的,也经常会用到时间的运算,自己也曾经为时间的各种表示方法和如何修改时间而困惑,熟练运用date命令来表示自己想要表示的时间,肯定可以给自己的工作带来诸多方便,??? 以下是我在工作[详细]
-
linux 进程综合指令
所属栏目:[Linux] 日期:2021-02-05 热度:192
1. 查询当前机器运行的进程总数: 2. ulimit命令 表 1. ulimit 参数说明 3. top -p pid 查看内存和cpu占用。只要看wa占用。 4. free -m 内存使用情况 ? ? cached ?free total shared ?buffers 5. grep -c 查询总行数 6.lsof(list open files)是一个列出当[详细]
-
Linux Top 命令解析 比较详细--转
所属栏目:[Linux] 日期:2021-02-05 热度:97
副标题#e# TOP是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止.比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用[详细]
-
rsync+inotify实现服务器之间文件实时同步--转
所属栏目:[Linux] 日期:2021-02-05 热度:190
副标题#e# 之前做了“ssh信任与scp自动传输脚本”的技术文档,此方案是作为公司里备份的方法,但在实际的运行中,由于主服务器在给备份服务器传输的时候,我们的主服务器需要备份的文件是实时、不停的产生的,造成不知道主服务器给备份服务器传输了多少文件[详细]
-
linux 管道--转
所属栏目:[Linux] 日期:2021-02-05 热度:124
副标题#e# h1 class="title_txt"linux 管道? div class="blogstory" 管道是Linux中很重要的一种通信方式,是把一个程序的输出直接连接到另一个程序的输入,常说的管道多是指无名管道,无名管道只能用于具有亲缘关系的进程之间,这是它与有名管道的最大区别。[详细]
-
8 Pratical Examples of Linux “Touch” Command--reference
所属栏目:[Linux] 日期:2021-02-05 热度:128
副标题#e# In?Linux?every single file is associated with timestamps,and every file stores the information of last access time,last modification time and last change time. So,whenever we create new file,access or modify an existing file,the[详细]
-
linux find命令详解--转
所属栏目:[Linux] 日期:2021-02-05 热度:105
副标题#e# 转自:http://blog.csdn.net/jakee304/article/details/1792830 (一)Get Start 最简单的find用法莫过于如此: $?find?. 查找当前目录下的所有文件。find命令的一般格式为: find?[-H]?[-L]?[-P]?[path...]?[expression] 其中,'-H' '-L' '-P'三[详细]
-
linux cat 命令详解--转
所属栏目:[Linux] 日期:2021-02-05 热度:107
使用方式:cat [-AbeEnstTuv] [--help] [--version] fileName?说明:把档案串连接后传到基本输出(萤幕或加 > fileName 到另一个档案)?参数:?-n 或 --number 由 1 开始对所有输出的行数编号?-b 或 --number-nonblank 和 -n 相似,只不过对于空白行不编号[详细]
-
15 Linux Split and Join Command Examples to Manage Large Fil
所属栏目:[Linux] 日期:2021-02-05 热度:175
副标题#e# by??on? http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-command-examples-to-manage-large-files/ Linux split and join commands are very helpful when you are manipulating large files. This article explains how to use L[详细]
-
linux dig 命令
所属栏目:[Linux] 日期:2021-02-03 热度:200
$ dig baidu.com /tr tr tdspan style="font-family: Microsoft YaHei; font-size: 15px"A/td tdspan style="font-family: Microsoft YaHei; font-size: 15px"地址记录,用来指定域名的 IPv4 地址,如果需要将域名指向一个 IP 地址,就需要添加 A 记录。/t[详细]
-
Ubuntu 中登录相关的日志
所属栏目:[Linux] 日期:2021-02-03 热度:76
$ nick@myserver $ vim /var/log/auth.log $ -f /var/log/btmp $ $ -f /var/log/wtmp. $ reboot $[详细]
-
linux sed 命令
所属栏目:[Linux] 日期:2021-02-03 热度:184
aabbcc Hello world! Hello Jack!Hello China!Hello Nick! $ test.txt # 删除第二行到最后一行 选项 -i $ -i '1d' test.txt $ test.txt # 在第一行下面新增一行,内容为 test.txt # 在最后一行下面新增一行,内容为 , test.txt # 一次增加多行需要使用换行[详细]
-
linux kill 命令
所属栏目:[Linux] 日期:2021-02-03 热度:186
[options] span style="color: #000000" […] : 把信号发送给列出的所有进程。 options :- span style="color: #000000" : 指定发送给进程的信号,指定信号的名称或号码都可以。 /span-l : 列出所有信号的名称和号码。/pre $ -l /tr tr tdspan style="font[详细]
-
TeamCity : 安装 Agent
所属栏目:[Linux] 日期:2021-02-03 热度:147
副标题#e# $ $ $ buildAgent.dist.properties buildAgent.properties name=tcagent1 $ cd /var/local/ -R tcuser:tcuser buildagent/ $ #p#副标题#e# #p#副标题#e# #p#副标题#e# #!/bin/=#p#副标题#e# span style="color: #0000ff"case span style="color:[详细]
-
TeamCity : 安装 Server
所属栏目:[Linux] 日期:2021-02-03 热度:88
副标题#e# $ -xf TeamCity-...gz -C ~/ $ ./teamcity-server. start #p#副标题#e# #p#副标题#e# #p#副标题#e# #p#副标题#e# #p#副标题#e# #!/bin//etc/init.d/teamcity - startup script =/usr/lib/jdk1.=${JAVA_HOME}/=.:${JAVA_HOME}/lib:${JRE_HOME}/=${[详细]
-
Ubuntu14.04安装postgresql9.4
所属栏目:[Linux] 日期:2021-02-03 热度:129
安装前的检查 首先查看是否已经安装了旧版本: dpkg -l | postgresql 如果已经安装了某个版本的postgresql,请先卸载。 安装postgresql 添加postgresql源: /etc/apt/sources.list.d/ vim /etc/apt/sources.list.d/pgdb.list 把下面这行数据添加到pgdb.lis[详细]
-
linux 定时任务
所属栏目:[Linux] 日期:2021-01-28 热度:74
p style="margin: 0in; font-size: 11.0pt;" lang="zh-CN"span style="font-family: 'Microsoft YaHei'; font-size: 15px;"习惯了使用span style="font-family: Calibri;" windows span style="font-family: 'Microsoft YaHei';"的计划任务,span style="f[详细]
-
Ubuntu14.04安装JDK
所属栏目:[Linux] 日期:2021-01-28 热度:109
下载oracle jdk包 从oracle官网下载jdk包,请选择Linux的tar包: 如果想使用命令行下载工具进行下载,可以先获得下载地址,然后运行curl进行下载: curl -L -O -H -k 解压缩 把jdk包解压缩到/usr/lib目录下: -zxf jdk-8u91-linux-x64..gz -C /usr/lib/ 到[详细]