I have a list of directories from the result of a search:
$ find . -name dir
./dir1
./dir1/dir1.1
./dir2
How can I ls all this directories at the same time?
将您的命令xargs ls
到xargs ls
:
find . -name dir | xargs ls
You can use these commands to do such:
1) find . -name "dir*" -exec ls {} \\;
find . -name "dir*" -exec ls {} \\;
2) find . -name "dir*" | xargs ls
find . -name "dir*" | xargs ls
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.