首页 > 新文章
  • Shell之“/dev/null 21” is a project mainly written in , based on the .shell中可能经常能看到:>/dev/null 2>&1 命令的结果可以通过%>的形式来定义输出 分解这个组合:“>/dev/null 2>&1” 为五部分。 1:> 代表重定向到哪里,例如:echo "123" > /home/123.txt 2:/dev/null 代表空设备文件 3:2> 表示stderr标准错误...

  • 对ARM异常(Exceptions)的理解 is a project mainly written in , based on the .对ARM异常(Exceptions)的理解 1 .对 ARM 异常( Exceptions )的理解 所有的系统引导程序前面中会有一段类似的代码,如下: .globl _start                    ;系统复位位置 _start: b       reset            ;各...

  • Grep 在HP-UX下的递归查找 is a project mainly written in , based on the .grep 在HP-UX下的递归查找 Linux: man grep 可以看到 -r 选项  -R, -r, --recursive               Read all files under each directory, recursively; this is equivalent to the -d recu...

  • Linux中的粘滞位 is a project mainly written in , based on the .Linux中的粘滞位 Sticky 位是一个访问权限标志位,可以用来标示文件和路径。 历史: 粘滞位是在1974年Unix的第5版中引入的,用来设置可执行文件。当可执行文件设置粘滞位之后,它能够指示操作系统在程序退出后,保留程序的代码段到swap空间。当程序再次执行时,内核只需将程序从swap搬到内存即可,这能够加速程序的执行。...

  • UTRAN 的用户面和控制面 is a project mainly written in , based on the .UTRAN接口的通用协议模型如下图: 通俗地讲,通讯网络由终端(terminal)、连接(links)、网络节点(nodes)组成, links将nodes 关联起来。源终端(MO)发送的消息是怎样才能到目的终端(MT)呢? 消息经过links 和nodes,直至到达MT,其中关键是nodes怎么路由(route)消息到最终...

  • Shell中引号的使用方法 is a project mainly written in , based on the . [h1]反斜杠只能够阻止一个字符  [h2]位于键盘的左上角,和~公用一个键。...

  • Setuid和setgid is a project mainly written in , based on the .setuid 和 setgid (全称分别是:set user ID upon execution 和 set group ID upon execution)是Unix的访问权限标志位,它允许 用户以可执行文件owner或group的权限来运行这个可执行文件。它们经常适用于:为了运行特定的任务,可以允许用户暂时的提高权限。用处: 暂...

  • Ubuntu 大小写指示的小工具 is a project mainly written in , based on the .        最近买个了小本lenovo x100e,结果发现这小本没有大小写指示灯,在windows用也无妨,不过我常常用这本在ubuntu中调试linux代码,vi 常用的编辑器,熟悉的都知道,大小写很关键的,用google搜了一下,发现可以用如下方法解决:        1.  “sudo apt-get install l...

  • 两个类相互包含引用的问题--类前向声明 is a project mainly written in , based on the .在构造自己的类时,有可能会碰到两个类之间的相互引用问题,例如:定义了类A类B,A中使用了B定义的类型,B中也使用了A定义的类型 class A {     int i;     B b; } class B {     int i;     A* a; } 请注意上面的定义内容,一般情况下是不能出现类A,类B相互引用都定义对象,即...

  • Gcc中-pthread和-lpthread的区别 is a project mainly written in , based on the .Shell代码   gcc -c x.c  gcc x.o -ox -lpthread  ...

  • Ldconfig及 LD_LIBRARY_PATH is a project mainly written in , based on the .ldconfig及 LD_LIBRARY_PATH 1. 往/lib和/usr/lib里面加东西,是不用修改/etc/ld.so.conf的,但是完了之后要调一下ldconfig,不然这个library会找不到 2.想往上面两个目录以外加东西的时候,一定要修改/etc/ld.so.conf,然后再调用ldconfig,不然也会找不到...

  • +z +Z compiler flag for HP is a project mainly written in , based on the .1.      今天遇到一问题,在sles11/vxworks下编译通过,但是在hpux下失败 2.      编译错误: /usr/ccs/bin/ld:DP relative code in file /projects/xxx/DERIVED/tfa_pa32-hpux.a(tfa02_pa32-hpux.o) -share...

  • LINUX UMASK详解 is a project mainly written in , based on the .一 权限掩码umask umask是chmod配套的,总共为4位(gid/uid,属主,组权,其它用户的权限),不过通常用到的是后3个,例如你用chmod 755 file(此时这文件的权限是属主读(4)+写(2)+执行(1),同组的和其它用户有读写权限) 二 umask的作用 默认情况下的umask值是022(可以用umas...

  • C++标准库中sstream和strstream的区别 is a project mainly written in , based on the .在C++有两种字符串流,一种在sstream中定义, 另一种在strstream中定义。 它们实现的东西基本一样。 strstream里包含 class strstreambuf; class istrstream; class ostrstream; class strstream; 它们是基于C类型字符串char*编写的...

  • 常见主机字节序 is a project mainly written in , based on the .常见主机字节序   1. Little endian:将低序字节存储在起始地址   2. Big endian:将高序字节存储在起始地址   LE little-endian   最符合人的 思维的字节序   地址低位存储值的低位   地址高位存储值的高位   怎么讲是最符合人的思维的字节序,是因为从人的第一观感...

  • Gdb debug is a project mainly written in , based on the .1. dir 添加源代码查找路径 一般工程的代码会有多路径,gdb会在当前目录下搜索符号对应的代码。利用dir 可以添加代码搜索路径; 例如工程目录: ./ ./dir_1/ ./dir_2/ 可以用如下命令添加代码搜索路径: dir dir_1 dir dir_2 2. 调试多参数的程序...

  • 正则表达式分类 区别 is a project mainly written in , based on the .原文地址:http://www.cnblogs.com/chengmo/archive/2010/10/10/1847287.html 正则表达式:在计算机科学中,是指一个用来描述或者匹配一系列符合某个句法规则的字符串的单个字符串。在很多文本编辑器或其他工具里,正则表达式通常被用来检索和/或替换那些符合某个模式的文本内容。许多程序设...

  • Linux中与进程终止相关的信号SIGTERM,SIGKILL,SIGINT is a project mainly written in , based on the .1.      SIGTERM “kill pid” 会发送SIGTERM到进程pid. This is the termination signal sent by killcommand by default. 2.      SIGINT 在终端中敲入interrupt key(DELETE或ctrl+c)会产生SIG...

  • C++ 和C 语言混合代码导致的问题 is a project mainly written in , based on the .C语言中操作字符串用C运行时函数:strtok, strcmp, strcpy等等,直接操作内存。在c++引入的字符串操作类std:string ,string类中必有一个私有成员,其是一个char*,用户记录从堆上分配内存的地址,其在构造时分配内存,在析构时释放内存。因为是从堆上分配内存,所以string类在维护这块内存上是格外小心...

  • 人生如流星 is a project mainly written in , based on the .人的一生就像一颗流星,有着各自的轨迹, 无论多么绚烂多彩,但都逃不脱坠落的宿命。 浩瀚宇宙,一天, 你与另外一颗不期而遇, 如果吸引力足够, 就尽情的撞击在一起, 爆发出最强大的光芒, 在天空中留下一道不会忘却的亮光, 试着改变自己的人生轨迹,一起来完成生命的历程。 但如果放开了手,各自恢复轨道 那么也只能在空中留下来一个...