I have a directory structure of
- folder1
- folder2
- folder2a
- folder2b
- folder3
- folder3a
- folder3b
- folder2
I am confused by the xargs output of the below command:
XXXXXX:folder1 user$ find . -type d -maxdepth 1 | xargs -I{} find {} -type d -maxdepth 1 | xargs -I{} echo {}
.
./folder2
./folder3
./folder2
./folder2/folder2b
./folder2/folder2a
./folder3
./folder3/folder3a
./folder3/folder3b
I was expecting
./folder2
./folder2/folder2b
./folder2/folder2a
./folder3
./folder3/folder3a
./folder3/folder3b
Is the beginning output below from the first find command?
.
./folder2
./folder3
I thought the output of the first find command being piped as parameters to the second find and shouldn't be output. Where is the first part of the output coming from?