Match all files under all nested directories with shell globbing

后端 未结 6 1043
星月不相逢
星月不相逢 2021-02-03 23:35

Is there a way to use shell globbing to identify nested directories?

so if I have dir/dir1/dir2/dir3/dir4/dir5/.. and I have files under all of them, what is the equival

6条回答
  •  囚心锁ツ
    2021-02-04 00:11

    If you want to act on all the files returned by find, rather than just list them, you can pipe them to xargs:

    find  -type f | xargs ls
    

    But this is only for commands that don't have a recursive flag.

提交回复
热议问题