Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I tell ( if I can tell !) find to find files of both the directory and file type?

find -type fd

It is like the heuristic dark ages up in here.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Here is the command you can use:

find -type f -or -type d
share|improve this answer
3  
Or find -type f -o -type d for POSIX compliant alternative. –  manatwork Nov 3 '12 at 14:54
    
Hey I ran into a little trouble with this when I run $find . -type d -or -type f -and -iname "vision" it does not do exactly what I expect, am I missing something else! –  James Andino Nov 3 '12 at 15:56
1  
-a has precedence over -o, use parenthesis (but escape them for the shell). No need to use the non-standard -or or -and. –  Stephane Chazelas Nov 3 '12 at 16:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.