unix环境高级编程

根据头文件找实现的库文件:
echo `dirname \`find /usr/lib -name libc.so 2>/dev/null\``/*|xargs ls -d|grep .*\\.a$| while read line; do nm -s $line 2>/dev/null|grep '^read in';done|awk '{print $3}';

echo `dirname \`find /usr/lib -name libc.so 2>/dev/null\``/*|xargs ls -d|grep .*\\.a$|while read line;do echo $line; ar -t $line|grep '^read.o$'; done 2>/dev/null;

echo `dirname \`find /usr/lib -name libc.so 2>/dev/null\``/*|xargs ls -d|grep .*\\.a$| while read line; do nm -s $line 2>/dev/null|grep '^read in';done|awk '{print $3}'|while read binfilename; do echo `dirname \`find /usr/lib -name libc.so 2>/dev/null\``/*|xargs ls -d|grep .*\\.a$|while read line;do echo $line; ar -t $line|grep ^$binfilename$; done 2>/dev/null; done;

Ctrl+d == 0 ==EOF
STDIN_FILENO,STDOUT_FILENO,STDERR_FILENO are defined in unistd.h
stdin,stdout,stderr are defined in stdio.h

xargs命令:因为有些命令不能接受管道参数,所以需要xargs接受上个管道传过来的stdin,例如ls命令不能接受管道参数,所以必须写成:
echo '/home' | xargs ls

singal:
通知进程发生某种情况的一种技术.
发送方:
键盘:按中断键ctrl+c
另一个进程kill发送
当收到通知的进程会有三种处理信号的方式:
ignore, default(终止当前进程),注册自定义函数到某个信号上

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================

=======================================================================================================






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值