常用Shell命令1
来源:互联网 发布:叶璇金星知乎 编辑:程序博客网 时间:2024/06/07 04:05
- awk过滤
grep bid=12007 /usr/local/openresty/nginx/logs/error.log | awk -F '\\[ValidateTest\\] |, client' '{print $2}' > ~/Downloads/battle_12007_server.log
- nginx的启动和关闭:
/usr/local/openresty/nginx/sbin/nginx
/usr/local/openresty/nginx/sbin/nginx -s stop
/usr/local/openresty/nginx/sbin/nginx -s stop
- 时间过滤:
grep 'ValidateTest' ../logs/error.log | awk '$1$2 >="2015/12/2615:00:00" && $1$2 <= "2015/12/2616:00:00"' | more
- 字符替换:
$ sed -i -e ‘s/foo/bar/g’ myfile.txt
-e: 表达式
-i:表示直接替换源文件
- 字符裁剪
grep 'ValidateDG' test.log |cut -c26- > ~/Downloads/battle_client_40916_2.log
cut -c26-: 去掉前面26个字符
- 统计当前目录空间使用情况
sudo du -sh ./*
场合:ssd快要爆了,要清理一下
- adb查看进程
adb shell ps
- 查看某个进程的内存
adb shell
dumpsys meminfo com.nxtomo.gch_hk_tw
dumpsys meminfo com.nxtomo.gch_hk_tw
- 查找并显示前10,后10
grep -A10 -B10 ‘show item’ file
0 0
- 常用Shell命令1
- 常用Shell命令用法(1)
- 几个常用SHELL命令
- Linux常用shell命令
- Linux常用shell命令
- 常用Windows Shell命令
- 常用shell命令
- 常用shell命令
- 常用的shell命令
- 常用shell命令
- 常用shell命令
- 常用shell命令
- 常用 shell 命令 -tar
- shell 常用的命令
- Linux常用Shell命令
- 常用的Shell命令
- linux 常用shell命令
- linux常用shell命令
- 【Android新手笔记一】编辑框edittext实现单选或多选等对话框
- iOS UI篇4—CAlayer(自定义layer)
- objective-c -- 网络数据库 - 关于微博、微信等分享
- C#—容器类控件操作
- Python Flask Web 第一课 —— 基本概念和程序的基本结构
- 常用Shell命令1
- TrueCrypt作者声称创建分支是“不可能的”
- PostgreSQL配置优化
- 关于类名后加&符号时基类引用派生类的问题
- iOS开发之集成百度地图
- delphi数据库数据显示
- Docker详解
- 再谈利用SharpShell实现Windows Shell扩展
- Web性能优化之Apache篇