Debug 相关:
1.1 ldd 查看可执行文件依赖库
-
[martin@~]$ ldd /usr/bin/git
-
linux-gate.so.1 => (0xb7711000)
-
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb76e4000)
-
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76c9000)
-
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb751f000)
-
/lib/ld-linux.so.2 (0xb7712000)
-
[martin@~]$
1.2 objdump 查看目标文件的汇编代码(该目标文件没有被stripped)
-
objdump -D $file > assemble_file
Git 相关:
2.1 clone 远程仓库到本地:
2.2 切换本地的branch,同时进行track,之后在同一个branch 上就可以直接使用 git pull/push 命令
-
git co -t -b branch1 origin/branch1
2.3 显示log 信息
-
[martin@www]$ git log --graph --pretty=short
-
[martin@www]$ git log --graph --pretty=format:" %h: %s"
2.4 查看文件内容的修改记录(该命令可以查看该文件中所有内容的最后修改信息)
-
[martin@REV]$ git blame file_name
dpkt 相关:
3.1 查看最近的更新记录:
-
grep '[^-]installed' /var/log/dpkg.log
4.1 fg bg jobs Ctrl+z
Ctrl+z 可以将当前运行进程放置到后台,并且暂停运行
-
[martin@REV]$ ./martin
-
^Z
-
[3]+ Stopped ./martin
-
[martin@REV]$
jobs 可以查看当前终端在后台运行的进程
-
[martin@REV]$ jobs
-
[1] Stopped ./martin
-
[2]- Stopped ./martin
-
[3]+ Stopped ./martin
-
[martin@REV]$
bg 可以使 当前在后台暂停 的进程切换到 在后台运行状态。后面可以同时指定对应的进程号(在jobs中显示的号码)
-
[martin@REV]$
-
[martin@REV]$ bg
-
[3]+ ./martin &
-
[martin@REV]$ jobs
-
[1]- Stopped ./martin
-
[2]+ Stopped ./martin
-
[3] Running ./martin &
-
[martin@REV]$
-
[martin@REV]$ bg 1
-
[1]- ./martin &
-
[martin@REV]$
-
[martin@REV]$ jobs
-
[1] Running ./martin &
-
[2]+ Stopped ./martin
-
[3]- Running ./martin &
-
[martin@REV]$
fg 使当前在后台的某进程 切换到 前台运行状态
-
[martin@REV]$ jobs
-
[1] Running ./martin &
-
[2]+ Stopped ./martin
-
[3]- Running ./martin &
-
[martin@REV]$
-
[martin@REV]$
-
[martin@REV]$
-
[martin@REV]$
-
[martin@REV]$ fg 2
-
./martin
-
^Z
-
[2]+ Stopped ./martin
-
[martin@REV]$
-
[martin@REV]$
-
[martin@REV]$ jobs
-
[1] Running ./martin &
-
[2]+ Stopped ./martin
-
[3]- Running ./martin &
-
[martin@REV]$
-
[martin@REV]$ fg
-
./martin
-
^Z
-
[2]+ Stopped ./martin
-
[martin@REV]$
阅读(721) | 评论(0) | 转发(0) |