易截截图软件、单文件、免安装、纯绿色、仅160KB

列出Linux源码下所有Makefile的方法

 一、要求:
1、能够显示出Makefile的总数
2、能显示一级目录下的Makefile总数、Makefile列表及其Makefile的内容
3、能将上述内容写入相应的文件
二、实例
rm -rf ~/Desktop/linux_Makefile/*
for i in `find . -maxdepth 1 -type d`
#仅仅是当前目录,所以请将本脚本放在linux源码目录下执行。
do
 echo $i
 mkdir -p ~/Desktop/linux_Makefile/$i
 find $i -type f -name "Makefile" -print | echo -e ""$i" Total is:`wc -l`" >> ~/Desktop/linux_Makefile/total_Makefile_list_about.txt
#
Makefile的总数
 find $i -type f -name "Makefile" -print | echo -e "\n"$i"'s Makefile Total number is:`wc -l`\n" > ~/Desktop/linux_Makefile/$i/"$i"_Makefile_list.txt
 find $i -type f -name "Makefile" -print >> ~/Desktop/linux_Makefile/$i/"$i"_Makefile_list.txt
 find $i -type f -name "Makefile" -printf "\n# ============================================================\n# " -print -printf "# ============================================================\n\n" -exec cat {} \; >> ~/Desktop/linux_Makefile/$i/"$i"_Makefile_content.txt
done
mv ~/Desktop/linux_Makefile/._Makefile_content.txt ~/Desktop/linux_Makefile/total_Makefile_content.txt
mv ~/Desktop/linux_Makefile/._Makefile_list.txt ~/Desktop/linux_Makefile/total_Makefile_list.txt
三、扩展成通用的文件归纳程序


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

实战Linux Bluetooth编程(六) L2CAP编程实例

例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
 如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......

Linux查看和剔除当前登录用户

如何在linux下查看当前登录的用户,并且踢掉你认为应该踢掉的用户?
看了网络中的一些例子.在这里总结一下.主要用到的命令有,w,who,ps,kill,pkill
查看当前登录用户:
node8:/home # who
root     :0           2009-11-04 16:26
root     pts/0       &n ......

如何成为一个Linux系统内核开发者

  你想成知道如何成为一个Linux内核开发者么?或者你的老板告诉你,“去为这个设备写一个Linux驱动。“这篇文档的目的,就是通过描述你需要经历的过程和提示你如何和社区一起工作,来教给你为达到这些目的所需要知道的所有知识。本文也尝试解释社区为什么这样工作的一些原因。
  内核几乎全是用C写成的,有 ......

回顾:东京Linux内核大会合影,No女性

 这是出席在2009年10月20日在东京举行的Linux内核大会合影照。全分辨率照片。一个女性都没有。你认识其中的几位呢?
以下是出席会议的名单,有兴趣的朋友可以对一对:
Al Viro
Alan Cox
Andi Kleen
Andrew Morton
Andy Whitcroft
Arjan van de Ven
Arnd Bergmann
Avi Kivity
Benjamin Herrenschmidt
Brian ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号