[C++] Pen questions & linux cmd】的更多相关文章

1.宏替换,完全展开替换,注意带来副作用 #include <stdio.h>#define 打印语句 printf(“hello”); Void main(void) { If (1) 打印语句;; Else ….; } Void main(void) { If (1) printf(“hello”); ; Else ….; } 2.程序编译链接的过程 .c 经过预处理,编译,汇编,链接,最终生成可执行程序(.exe/ELF) 3.常量,定义以后其值不能改变的数 宏定义一个常量 #defin…
Intro Sometime we want to record cmd and outputs in the interactive shell sessions. However history cmd cannot do this. So we need cmd line recording tool like script and scriptreplay. References Master's Shoulder:How to Record and Replay Linux Termi…
在linux或者直接在cmd中运行python文件时 会遇到导包错误的情况ModuleNotFoundError: No module named 'xxx’由于不在pycharm中 所以这里不能将上一级目录加入 sources root 方法1:所以只能在导入前加入 路径的位置 于sys中 import osimport sys curPath = os.path.abspath(os.path.dirname(__file__)) rootPath = os.path.split(curPa…
The alias cmd list your current aliases. For example : alias Use alias to shorten a long cmd in current shell session: alias [name=['command']] Use unalias to remove the alias , or use "\"(back-slash) before command to disable alias. Your ~/.bas…
History cmd is for list Bash's log of the historical cmd you typed 1. List last n commands history n 2. Execute cmd No.n !n 3. Execute last cmd !! or !- 4. Execute command n times before !-n 5. Execute the last cmd that starts with "string" !str…
0x01 Linux Perfermance Analysis in 60s 1> uptime ---load averages 2> dmesg -r | tail ---kernel errors 3> vmstat 1---overall stats by time 4> mpstat -P ALL 1 ---CPU balance 5> pidstat 1 ---process usage 6> iostat -xz 1 ---disk I/O 7> f…
每天一个linux命令(41):ps命令 http://www.cnblogs.com/peida/archive/2012/12/19/2824418.html Linux中的ps命令是Process Status的缩写.ps命令用来列出系统中当前运行的那些进程.ps命令列出的是当前那些进程的快照,就是执行ps命令的那个时刻的那些进程,如果想要动态的显示进程信息,就可以使用top命令. ps 为我们提供了进程的一次性的查看,它所提供的查看结果并不动态连续的:如果想对进程时间监控,应该用 top…
每天一个linux命令:netstat  http://www.cnblogs.com/peida/archive/2013/03/08/2949194.html netstat命令用于显示与IP.TCP.UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况.netstat是在内核中访问网络及相关信息的程序,它能提供TCP连接,TCP和UDP监听,进程内存管理的相关报告. 如果你的计算机有时候接收到的数据报导致出错数据或故障,你不必感到奇怪,TCP/IP可以容许这些类型的错误…
linux下解压命令大全 .tar 解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)———————————————.gz解压1:gunzip FileName.gz解压2:gzip -d FileName.gz压缩:gzip FileName .tar.gz 和 .tgz解压:tar zxvf FileName.tar.gz压缩:tar zcvf FileName.tar.gz DirName——————…
Linux查找包含特定字符串的文件名的方法 Pasted from <http://www.jbxue.com/LINUXjishu/9790.html> find .|xargs grep -i "xxxx" find . -maxdepth 2|xargs grep "xxxx" find . -maxdepth 2 -name "*.txt" |xargs grep "xxxx" ls 显示子目录结构 ls…