Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 5 down vote accepted

Here is the command you can use:

find -type f -or -type d
share|improve this answer
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! – Prospero Nov 3 '12 at 15:56
-a has precedence over -o, use parenthesis (but escape them for the shell). No need to use the non-standard -or or -and. – Stéphane Chazelas Nov 3 '12 at 16:52

Your Answer


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.