linux上使用vi时常用的命令
1、简单的查找并替换为新的字符串
:%s/查找的字符串/新的字符串/g
eg:查找“liliang” 并将其替换为“liangli”
:%s/liliang/liangli/g
其中“\”为转义符
eg:查找“li/liang” 并将其替换为“liliang”(即把被查找字符串中的斜杠去掉)
:%s/li\/liang/liliang/g
2、查找命令
顺序查找字符串
/字符串
逆序查找字符串
?字符串
n 按第一、二命令的顺序继续查找下一个字符串
N 按第一、二命令的相反的顺序继续查找下一个字符串
3、行号
添加行号
:set number (:set nu)
不显示行号
:set nonumber (:set nonu)
4、光标移动
将光标移动到指定的行数
:行数
将光标移动到文本的开始处
gg
将光标移动到文本的末尾
G (我习惯shift + g)
5、每个字符的使用说明(从其他地方拷贝过来的,有些没验证,红色是我经常用到的)
a 在当前位置之后添加
A 在当前行的末尾添加
^a 没有使用
b 上一个单词的开头
B 上一个单词的开头,忽略标点符号
^b 上移一屏
c 覆盖...
C 覆盖到行末尾
^c 终止插入模式,在命令模式没有用
d 删除... 后面跟其它键,非常有用
D 删除到行末尾
^d 下移半屏,如果在插入模式下则移到上一个移动宽度(ShiftTab)处
相关文档:
Linux
多线程编程:【
http://fanqiang.chinaunix.net/a4/b8/20010811/0905001105.html
】
Linux
多线程支持
POSIX
线程接口,称为
pthread,
pthread_create
用来创建线程,
pthread_join
等待线程结束,函数的原型分别如下:
&nbs ......
网上有篇帖子包含里linux下的dnw,我在用idea6410,编译dnw和secbulk后并不能正常使用
LINUX下的DNW程序下载
http://linux.chinaunix.net/bbs/viewthread.php?tid=1055992
secbulk设备未建立,手动建立/dev/secbulk0并不起作用,原因是secbulk probe会匹配id_table,这个是为QQ2440准备的,所以需要改id_table
static s ......
功能描述:
获取一些文件相关的信息。
用法:
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *path, struct stat *buf);
int fstat(int filedes, struct stat *buf);
int lstat(const char *path, struct stat *buf);
参数:
path:文件 ......
Get Redhat Enterprise 3.0 from:
Your local RedHat rep�
Get Veritas’ VCS and VM products from:
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2.redhatlinux.tar.gz
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2MP1.redhatlinux.tar.gz
You will need a temporary key to complete this ......
linux 下 用c语言创建mysql数据库笔记(二)
-------两个简单的例子,供参考比较
《例一》
#include <stdio.h>
#include <stdlib.h>
#include
&q ......