0
我需要在当前文件夹(非递归)和其他一些文件夹(递归)中查找文件。例如我有一个树结构,如:Linux仅为当前文件夹和指定文件夹找到'''
- 的folder1/
- 文件夹2/
- folder2-1/
- file2-1.php
- folder2-1/
- folder3/
- file3-1.php
- file1.php
- file2.php
我想找到的文件file1.php
,file2.php
和file2-1.php
只。所以,在根目录+ folder2 /中递归搜索。
所有我能找到的资源描述要么
find . -maxdepth 1 -iname "*.php" // gives `file1.php` and `file2.php`
或
find folder2 -iname "*.php" // gives me `file2-1.php`
所以:
问:如何结合这些命令?
P.S.我应该能够在命令行中进一步发送找到的文件的列表(例如xgettext)。
工作就像一个魅力,@tink!谢谢。 – spliter