vim gdb misc
2015-10-14 13:20
375 查看
1 e.g.
grep -l "ERROR:" *.log
to recursively search in a directory is as,
grep -r "LOG" *
where -r means recursively, * means match any file in current directory,
2
Q:
I have a small program, test.c. It runs OK. This is on Linux (kernel
2.6.8.1, GCC 3.4.1).
I decided to convert it to C++ before expanding it to a larger program. I
changed the filename to test.cpp and added
extern "C" {
}
around main and all the non-static subroutines. It compiles OK, but when I
link it, it says:
test.o (.eh_frame+0x11): undefined reference to '__gxx_personality_v0'
A:
use g++ to link
3
in vim, there's a xxd as an external program.
vim foo
:%!xxd
4
An exam from TLCL handbook (where TLCL= The Linux Command Line)
[me@linuxbox ~]$ diff -c file1.txt file2.txt
*** file1.txt 2008-12-23 06:40:13.000000000 -0500
--- file2.txt 2008-12-23 06:40:34.000000000 -0500
***************
*** 1,4 ****
- a
b
c
d
--- 1,4 ----
b
c
d
+ e
5 MPEG PES has been supported in wireshark
But the packet is inside UDP, not support that inside TCP.
There are also MPEG PES sample in wireshark official site.
6 gdb
x /16xb 0x8ae64de
16=length of memory
x = format, like printf(format)
b = binary
the result is as
0x47 0x00 0x11 0x17 0x1d 0x01 0xbb 0x01
7 vim how to search
1 search a word "word", use:/word, when found, use "n" or "N" or "3N" to go to next/previous one
2 search a word "word" ignore the case, use
:set ignorecase
/word
to set back, use
:set noignorecase
1 e.g.
grep -l "ERROR:" *.log
to recursively search in a directory is as,
grep -r "LOG" *
where -r means recursively, * means match any file in current directory,
2
Q:
I have a small program, test.c. It runs OK. This is on Linux (kernel
2.6.8.1, GCC 3.4.1).
I decided to convert it to C++ before expanding it to a larger program. I
changed the filename to test.cpp and added
extern "C" {
}
around main and all the non-static subroutines. It compiles OK, but when I
link it, it says:
test.o (.eh_frame+0x11): undefined reference to '__gxx_personality_v0'
A:
use g++ to link
3
in vim, there's a xxd as an external program.
vim foo
:%!xxd
4
An exam from TLCL handbook (where TLCL= The Linux Command Line)
[me@linuxbox ~]$ diff -c file1.txt file2.txt
*** file1.txt 2008-12-23 06:40:13.000000000 -0500
--- file2.txt 2008-12-23 06:40:34.000000000 -0500
***************
*** 1,4 ****
- a
b
c
d
--- 1,4 ----
b
c
d
+ e
5 MPEG PES has been supported in wireshark
But the packet is inside UDP, not support that inside TCP.
There are also MPEG PES sample in wireshark official site.
6 gdb
x /16xb 0x8ae64de
16=length of memory
x = format, like printf(format)
b = binary
the result is as
0x47 0x00 0x11 0x17 0x1d 0x01 0xbb 0x01
7 vim how to search
1 search a word "word", use:/word, when found, use "n" or "N" or "3N" to go to next/previous one
2 search a word "word" ignore the case, use
:set ignorecase
/word
to set back, use
:set noignorecase
相关文章推荐
- 13-Jquery其他效果下载
- NginxSSL
- CentOS6.7 安装Codeblocks
- percona-toolkit安装及使用
- 第7周项目3 - 负数把正数赶出队列
- DotNet_运算符重载,引用,比较
- Cocos2d-x 3.x 头像选择,本地相册图片+图片编辑(Android、IOS双平台)
- 机器学习系列(1)_逻辑回归初步
- 12-可以编辑的表格
- poj 1426
- zTree删除节点
- 多个请求调用一个Servlet
- Android各种资源详解 android开发教程
- 转载:Spring 4 + Quartz 集成举例
- jquery全选小功能
- [转]Android_气泡效果
- wp8.1 边开发边学习记录
- C语言回顾 十 动态内存分配
- 系统项目管理工程师20151011作业
- 【dedecms v5.7】导航使用一级二级栏目