【发布时间】:2016-11-27 22:25:24
【问题描述】:
当find 迭代目录时,它们会显示在the order the VFS yields them 中。这个顺序可以改成先遍历目录再查看放在旁边的文件吗?
-depth 选项不是解决方案。它只会改变
$ find
.
./afile
./directory
./directory/athirdfile
./other-directory
到
$ find -depth
./afile
./directory/athirdfile
./directory
./other-directory
(注意只有第二条和第三条输出线是如何交换位置的。)
这个问题反而寻求一种产生以下顺序的方法。
./directory/athirdfile
./directory
./other-directory
./afile
【问题讨论】:
标签: shell gnu-findutils find-util