tuns99
1
Can anyone see why the following command returns all files and not just the directories as specified?
find . -type d -exec ls -F {} \;
Also tried
find . -type d -name "" -exec ls -F {} \;
find . -type d -name "" -exec ls -F '{}' \; -print
Always returns all files :-\
OS is SUSEv10.
Thanks,
Mike.
vbe
2
your find looks for directories that exec ls -F display content (so files...)
tuns99
3
So I should have used -d with the ls :
find . -type d -exec ls -dF {} \;
to make the ls just display the dir and not the contents.
Thanks,
Mike.