显示更新内容


environment variable中最关键的一个:
$PATH variable stores all path on your machine that your shell will use to search for programs


其实这个不算是system programming,google chrome左右切换tab的键盘快捷方式:command+option+左箭头/右箭头


"cd -"会把你带到你之前所在的directory里去。用这个指令,你可以来回浏览两个不同的directory。


其实这个不算是system programming,google chrome左右切换tab的键盘快捷方式:command+option+左箭头/右箭头


c++ stl里的multimap的key是按照binary search tree的结构存储的。(这也跟system没有关系吧)

如何用shell command创建带有空格的文件名:
方法一:mkdir my\ photo
方法二:mkdir "my photo"
这个问题困扰了我好久,macos上我可视化界面创建的带空格文件名的文件,常常cd不进去。现在知道该怎么做了。


原来c++ 也支持lambda的编程方法啊,简单的例子就是在图二function的parameter里inline一个function。和javascript很像。


Container和Hypervisor的区别:
en.wikipedia.org/wiki/Hypervis
en.wikipedia.org/wiki/OS-level
type 1 hypervisor和type 2 hypervisor的区别如图。
=====================
ps:我以前的错误概念是,我以为的container实际上是container和type 2 hypervisor
我以为的hypervisor实际上是type 1 hypervisor。


另一个新学到的security相关词汇是zero-day exploit vulnerability. 定义如下:
en.wikipedia.org/wiki/Zero-day
不是搞security的所以稍微记住一点点。

再给需要在server上做实验(尤其是跑并行计算项目)的同学推荐一个实用的工具——tmux。这个工具可以帮你在terminal里创建session。当你在server端创建了这个session并跑起来实验之后,你可以随时退出server端,断网,带着笔记本电脑去上课。回来再连上server,进入之前的tmux session,你就能看到实验结果了。


虽然是个system phd但是我其实不知道sandbox是啥。于是把概念摘下来大家一起学习一下(已经知道的人就不用看了)
en.wikipedia.org/wiki/Sandbox_

再给需要在server上做实验(尤其是跑并行计算项目)的同学推荐一个实用的工具——tmux。这个工具可以帮你在terminal里创建session。当你在server端创建了这个session并跑起来实验之后,你可以随时退出server端,断网,带着笔记本电脑去上课。回来再连上server,进入之前的tmux session,你就能看到实验结果了。


小trick 1: makefile编译的时候LDFLAG最好放在-o之后。比如要写成
g++ -I/usr/local/include $^ -o $@ -L/usr/local/lib -lunwind

而不要写成:

g++ -I/usr/local/include -L/usr/local/lib -lunwind $^ -o $@

小trick 2: LD_PRELOAD={full_path of the target shared object file}

在说一个大家都知道但我还不知道的事情,在x86架构里,e开头的寄存器(例如$eip)是intel 32位处理器的寄存器,r开头的寄存器(例如$rip)是intel 64位处理器的寄存器。

linux 有一个command叫watch,watch -b ./executable的话,该程序以非exit(0)的状态退出,你的terminal就会发出beep的声音。适合我这种一边码字一边跑实验的人orz

继续 , patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 <binary> ,可以用来修复一个程序的interpreter。

the interpreter is the program that “launches” the executable file. For a regular binary it’s the loader, i.e., /lib64/ld-linux-x86-64.so.2. For a script it would be the script interpreter (bash, python, etc).

雾海

雾海是一个开放且不限制讨论主题的非营利性中文社区,名字来源于德国浪漫主义画家 Friedrich 的画作《雾海上的旅人》。生活总是在雾海中吞吐不定,不管怎么艰辛,他还是站在了这里!希望大家在这里玩的开心~