1.前言
在编译当中经常需要通过-I 来指定头文件搜索路径。
2.命令
-maxdepth <number> ; number 指定搜索深度.
find ./ -maxdepth 3 -type d
3.执行结果
-type d 表示搜索的是目录
./
./openssl
./nvc-camera
./nvc-event
./nvc-common
./json-c
./fdk-aac
./nvc-protocol
./nvc-protocol/protocol
./nvc-protocol/utils
./CUnit
./nvc-communication
./nvc-communication/common
./nvc-communication/camera
./nvc-communication/unpn
./nvc-communication/log
./nvc-communication/include
./nvc-communication/include/transport
./nvc-communication/include/session
./nvc-communication/include/connect
./nvc-communication/network
./nvc-communication/network/misc
./nvc-communication/network/util
./nvc-communication/network/transport
./nvc-communication/network/session
./nvc-communication/network/connect
./zbar
./nvc-rtsp
./nvc-env
./miniupnpc
4.命令
find ./ -maxdepth 3 -type f
执行结果:
leon@netview:~/work/develop/nvc-communication$ find ./ -maxdepth 3 -type f
./nvc-communication.PR
./nvc-communication.IAB
./nvc-communication.WK3
./nvc-communication.IMB
./nvc-communication.PRI
./src/common/nv_thread_pool.h
./src/common/nv_mainapp_common.h
./src/common/nv_net_tools.c
./src/common/nv_net_tools.h
./src/common/nv_mainapp_common.c
./src/common/nv_conf.h
./src/common/nv_conf.c
./src/common/tcl_customise.h
./src/common/nv_thread_pool.c
./src/common/tcl_customise.c
./src/camera/nv_adjust_video.h
./src/camera/net_fraction_queue.c
./src/camera/nv_archive.h
./src/camera/nv_database.c
./src/camera/matrix.h
./src/camera/nv_archive.c
./src/camera/nv_plugin.h
./src/camera/nv_camera.c
./src/camera/net_state_info_queue.h
./src/camera/matrix.c
./src/camera/nv_adjust_video.c
./src/camera/net_state_info_queue.c
./src/camera/nv_plugin.c
./src/camera/kalman.c
./src/camera/nv_database.h
./src/camera/kalman.h
./src/camera/nv_media_send_info_list.h
./src/camera/nv_media_send_info_list.c
./src/camera/net_fraction_queue.h
./src/camera/nv_camera.h
./src/unpn/nv_net_upnp.h
./src/unpn/nv_net_upnp.c
./src/version.h
./src/conf/updateFirmware.conf
./src/conf/token.conf
./src/conf/pluginInfo.conf
./src/conf/backupSrvip.conf
./src/conf/updateState.conf
./src/conf/device.conf
./src/conf/net.conf
./src/log/nv_record_run_data.h
./src/log/nv_record_run_data.c
./src/include/nv_communication.h
./src/network/nv_comm_system.c
./src/network/nv_comm_system.h
./src/nvc-communication.h
./build/log/compile.log
./Makefile
./nvc-communication.PO
./.gitignore
./nvc-communication.SearchResults
./nvc-communication.IMD
./.git/tortoisegit.index
./.git/COMMIT_EDITMSG
./.git/config
./.git/tortoisegit.data
./.git/ORIG_HEAD
./.git/description
./.git/logs/HEAD
./.git/index
./.git/info/exclude
./.git/hooks/pre-commit.sample
./.git/hooks/pre-applypatch.sample
./.git/hooks/pre-rebase.sample
./.git/hooks/pre-push.sample
./.git/hooks/prepare-commit-msg.sample
./.git/hooks/post-update.sample
./.git/hooks/update.sample
./.git/hooks/applypatch-msg.sample
./.git/hooks/commit-msg.sample
./.git/HEAD
./.git/packed-refs
./.git/FETCH_HEAD
./nvc-communication.PS
./nvc-communication.PFI
./nvc-communication.IAD
./config.mk
leon@netview:~/work/develop/nvc-communication$