您的位置:首页 > 运维架构 > Shell

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}')

=---------------------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: