linux --- shell command
2016-03-25 13:05
417 查看
-----------------grep----------------------
1. grep -F(fixed-string) xxx -r -R(path name) xxx/
2. grep -v(invert-match, non-match) -f(file) f1 f2 # output f2 but without the line in f1 # -f FILE(obtain patterns from FILE, one per line)
-n 输出行号; -c 匹配的个数
grep '^xxx' file_name
---------------cut-----------------------
cut -f1 -d':' xxxx
-----------------screen--------------
screen -S test-name
screen -ls
screen -r test
exit / kill
- ctrl a+d -- detached 无终端连接会话 (attached)
-ctrl a+S
-ctrl a+|
-ctrl a+c
-------------查看cpu信息----------nvidia-gpu---------------
cat /proc/cpuinfo
nvidia-smi
------------------解压到制定目录----
tar zxvf -C /path/to/save/
--------------------ps---------aux----------ef----------------------
kill -9 $(ps -ef | grep username | awk '{print $2}')
=---------------------------------------------------------
1. grep -F(fixed-string) xxx -r -R(path name) xxx/
2. grep -v(invert-match, non-match) -f(file) f1 f2 # output f2 but without the line in f1 # -f FILE(obtain patterns from FILE, one per line)
-n 输出行号; -c 匹配的个数
grep '^xxx' file_name
---------------cut-----------------------
cut -f1 -d':' xxxx
-----------------screen--------------
screen -S test-name
screen -ls
screen -r test
exit / kill
- ctrl a+d -- detached 无终端连接会话 (attached)
-ctrl a+S
-ctrl a+|
-ctrl a+c
-------------查看cpu信息----------nvidia-gpu---------------
cat /proc/cpuinfo
nvidia-smi
------------------解压到制定目录----
tar zxvf -C /path/to/save/
--------------------ps---------aux----------ef----------------------
kill -9 $(ps -ef | grep username | awk '{print $2}')
=---------------------------------------------------------
相关文章推荐
- Hbase shell详情
- shell-数组
- linux命令---bash基础
- [常用shell命令] 批量替换文件内容和文件名
- shell 逐行读取文件
- LINUX C 语言 快速获取调用SHELL命令后的结果
- linux shell 1
- shell判断字符串为空
- linux下shell脚本学习
- 关于 shell 脚本编程的10 个最佳实践
- 73条日常Linux shell命令汇总,总有一条你需要!
- IT_linux_shell_awk_sed_100篇--awk--例子
- jline初步了解
- ssh web版工具shellinabox解析
- 数据工程师常用的 Shell 命令
- shell从函数文件里调用函数
- Linux 学习之路:认识shell和bash
- shell写自动安装脚本自动读取license和自动输入回车
- SHELL脚本监控JAVA进程的代码
- 用shell脚本监控进程是否存在 不存在则启动的实例