时隔两年,又来了baidu,发现当年不少linux下经常使用的命令都记不大清楚了,挨个查找很是繁琐,因而下定决心仍是把一些常常碰到的作一作记录好了。linux
grep:shell
awk:vim
sed:bash
文件操做:url
vim: spa
BASH:code
shell中按行读入文件:blog
#!/bin/bash for line in `cat filename` do echo $line done
######## another way different output ##########
cat filename | while read line
do
echo $line
done
后台执行程序:nohup command >> file.out &进程
查看进程: ps -eip
杀死进程: kill pid