求教专家aix find -depth 输出问题:
求教专家find -depth 输出问题:
: find . -depth -name 'atter*' -print
输出如下:
./atter.sh
./atter1.sh
./atter2.sh
./tter/tter1/tter2/atter.sh
./tter/tter1/tter2/atter1.sh
./tter/tter1/tter2/atter2.sh
./tter/tter1/atter.sh
./tter/tter1/atter1.sh
./tter/tter1/atter2.sh
./tter/atter.sh
./tter/atter1.sh
./tter/atter2.sh
目录结构:
问题是为什么find -depth输出与目录结构顺序不一致(不带-depth输出也不一样),与man find 中的depth 没有效果?
*aix man find -depth * 说明如下:
-depth
Always evaluates to the value True. Causes the descent of the directory hierarchy to be done so that all entries in a directory are affected before the directory
itself is affected. This can be useful when the find command is used with the cpio command to transfer files that are contained in directories without write
permission.
: find . -depth -name 'atter*' -print
输出如下:
./atter.sh
./atter1.sh
./atter2.sh
./tter/tter1/tter2/atter.sh
./tter/tter1/tter2/atter1.sh
./tter/tter1/tter2/atter2.sh
./tter/tter1/atter.sh
./tter/tter1/atter1.sh
./tter/tter1/atter2.sh
./tter/atter.sh
./tter/atter1.sh
./tter/atter2.sh
目录结构:
tree.JPG (28.04 KB, 下载次数: 3)
问题是为什么find -depth输出与目录结构顺序不一致(不带-depth输出也不一样),与man find 中的depth 没有效果?
*aix man find -depth * 说明如下:
-depth
Always evaluates to the value True. Causes the descent of the directory hierarchy to be done so that all entries in a directory are affected before the directory
itself is affected. This can be useful when the find command is used with the cpio command to transfer files that are contained in directories without write
permission.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
求解?....