再帰的に処理をする部分をPythonで書いてもいいけれど、 subprocessでLinuxのコマンドを呼び出すと楽です。
#ファイル検索
import subprocess
findOutputs = subprocess.check_output(["find", "./data","-name", "*.txt"])
findOutputs=findOutputs.split("\n")
findOutputs.sort()#出力を見やすくソートする
del(findOutputs[0])#先頭の空白文字を消す
print(len(findOutputs))
#各ファイルについて処理をする
for filepath in findOutputs:
with open(filepath) as f:
for line in f:
print(line)#何かする
参考:http://docs.python.jp/2/library/subprocess.html


