列出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
三、扩展成通用的文件归纳程序
相关文档:
1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI) 就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......
sys_execve
| - do_execve
|
| - search_binary_handler
|- linux_binfmt= elf_format
|- elf_format-> load_elf_binary
| -&nbs ......
转来的,没事可以看看
bin = BINaries
/dev = DEVices
/etc = ETCetera
/lib = LIBrary
/proc = PROCesses
/sbin = Superuser BINaries
/tmp = TeMPorary
/usr = Unix Shared Resources
/var = VARiable ?
FIFO = First In, First Out
GRUB = GRand Unified Bootloader
IFS = Internal Field Seperators
LILO ......
这是出席在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 ......