码迷,mamicode.com
首页 > 系统相关 > 详细

(linux) 常用命令 干货

时间:2014-10-11 17:22:45      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:blog   http   使用   ar   strong   文件   sp   2014   on   

 

内容提要

1. 第一难度, 重要 梯队 (grep, awk, sed, find, )

2. 第二常用, 重要 梯队 (ps, ls, date, fuser, netstat, kill)

3. 第三 特殊用途 梯队 (压缩打包, 背景运行, 工作例程, 性能监控, 安装包)

4. 正则表达式

 


一. 难度, 重要

1. find

参考 blog, 经常用 xargs

 

2. grep

截取, 比如根据正则表达式, 截取部分内容, 或者根据前边的 standard output 然后在前面基础上截取哪些内容

 

3. sed

编辑

 

4. awk

分析文档, 根据不同情况, 执行不同操作

 

 


二. 常用, 重要

1. ps

ps –ef  查看每一个进程

 

2. ls

ls –alF

ll

ls –hlt  按照被修改的时间倒序

 

3. date

date +%Y%m%d   20141011   脚本格式时有用

 

4. fuser 查看某个文件正在被哪个user使用

fuser –uv /u01

 

5. netstat

netstat –tlnp

 

6. kill

kill –9 %job no, kill –9 PID

killall –i 9 httped (根据进程名字杀掉进程)


三. 特殊用途

压缩解压: 参照 blog

背景运行: jobs, fg, bg, nohup

工作例程: 参照 blog

性能监控: free –m, top, vmstat

安装包: rpm –qa, rpm –ivh *.rpm

(linux) 常用命令 干货

标签:blog   http   使用   ar   strong   文件   sp   2014   on   

原文地址:http://www.cnblogs.com/moveofgod/p/4019027.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!