作者: jcdiy0601 時(shí)間: 2016-03-16 09:24
find ./ -type f -name "*.txt" -mindepth 1 -exec cat {} \; > test
man了一下這兩個(gè)遞歸參數(shù)
-maxdepth levels
Descend at most levels (a non-negative integer) levels of directories below the command line arguments. -maxdepth 0 means only apply the tests and actions to the command line arguments.
-mindepth levels
Do not apply any tests or actions at levels less than levels (a non-negative integer). -mindepth 1 means process all files except the command line arguments.