Reputation: 2521
Why doesn't this work? (echo is not the real command)
$ find . -type d -exec echo {} \;
find: missing argument to `-exec'
I managed to do that anyway like this:
$ for f in `find . -type d`; do echo $f; done
Upvotes: 9
Views: 15927
Reputation: 321
This work for me.
find . -type f -exec file '{}' \;
Braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation.
Upvotes: 7
Reputation: 10057
The following line is from the EXAMPLES section of man find
:
find . -type f -exec file '{}' \;
It looks to me like the {}
part needs to be in single quotes.
Upvotes: 0