【发布时间】:2015-04-14 20:44:33
【问题描述】:
如何忽略 find 命令中的目录
find /testfile1
/testfile1
/testfile1/tmp1.txt
/testfile1/tmp2.txt
/testfile1/tmp3.txt
/testfile1/tmp4.txt
/testfile1/test1
/testfile1/test1/as
/testfile1/test1/dw
/testfile1/test2
/testfile1/test2/adsad
/testfile1/test2/bc
/testfile1 、 /testfile1/test1 和 /testfile1/test2 是目录。所以我想删除结果中的那些目录,我不能使用 type -f 因为我需要获取文件的完整路径。
那么我如何才能获得具有完整路径的文件,例如
/testfile1/tmp1.txt
/testfile1/tmp2.txt
/testfile1/tmp3.txt
/testfile1/tmp4.txt
/testfile1/test1/as
/testfile1/test1/dw
/testfile1/test2/adsad
/testfile1/test2/bc
谢谢
【问题讨论】: