linux常用命令操作
2016-08-31 00:00
197 查看
摘要: linux日志常用命令
3、修改系统日期
4、文件夹拷贝
5、压缩文件夹
6、解压文件
7、清空文件内容
8、查看和停止所有java进程
9、当前目录下批量替换文件内容
10、查看文件大小
11、Linux测试webservice接口
日志查看操作
1、查询指定关键字看日志
grep -n 'this is the keyword' /temp/robot-server.log
find / -type f -name "*.log" | xargs grep "ERROR"
2、指定行数看日志
cat /temp/robot-server.log | tail -n +3000 | head -n 1000
3、修改系统日期
date -s '2015-10-31 10:00:00'
4、文件夹拷贝
cp -ri /tomcat/oms/* /tomcat/oms-bak 远程拷贝 scp -rP 20020 /tomcat/eciqs tomcat@10.118.238.69:/tomcat/ 注:-r 整个文件夹拷贝, -P 指定目标端口【P为大写】
5、压缩文件夹
tar -czvf /tomcat/backup/oms.tar.gz /tomcat/oms
6、解压文件
cd /tomcat/oms-temp tar -xzvf /backup/oms.tar.gz 或者 tar -zxvf /backup/oms.tar.gz -C /tomcat/oms-temp/
7、清空文件内容
cat /dev/null >catalina.out
8、查看和停止所有java进程
查看所有java进程命令 ps -ef | grep java 停止所有java进程命令 pkill - 9 java 停止特定java进程命令 kill -9 java进程号
9、当前目录下批量替换文件内容
find -name '*.properties' | xargs perl -pi -e 's|原内容|新内容|g'
10、查看文件大小
ls -lht
11、Linux测试webservice接口
curl -k -H "Content-Type:text/xml;charset=utf-8;SOAPAction:Namespace:login" -d "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tan=\"http://www.tansun.com\"> <soapenv:Header/> <soapenv:Body> <tan:ruleEngineService> <ProjectName>basic</ProjectName> <EnterPoint>Basic_Rule</EnterPoint> <inputType>json</inputType> <Input>{\"input\":{\"areaProvince\":1,\"custGroup\":4}}</Input> </tan:ruleEngineService> </soapenv:Body> </soapenv:Envelope>" http://10.118.111.222:8005/RuleExcuter/service/Rules?wsdl[/code]
12、Linux测试http post jsoncurl -H "Content-Type: application/json" -X POST --data '{"queryType":"01","queryCode":["id_card":"430527XXX1314"}]}' http://10.118.111.222:1080/app/baseInfo[/code] 13、切换用户普通用户切管理spay用户 su spay 输入spay密码 sudo su root 输入spay密码
相关文章推荐
- linux常用基本操作命令
- Linux:常用的操作命令
- Linux 操作入门--常用命令记录
- linux下操作安装jdk和tomcat,ftp:linux进程操作常用命令
- linux常用的有关网络操作的命令:
- Linux文件操作常用命令
- linux目录操作和常用命令
- linux常用的操作命令
- [原创总结 不断更新]Linux 下常用命令操作总结
- linux常用的有关网络操作的命令:
- linux常用命令及操作备忘
- linux 下常用操作命令
- Linux系统的常用操作命令
- Linux常用操作命令整理
- linux的常用文件操作命令
- Linux下oracle数据库常用操作及命令
- Linux中最常用的基本操作命令
- LINUX下操作常用命令命令(1)
- Linux常用文件操作命令
- Linux常用命令(8):网络操作命令