Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

What is the difference between:
find . -name "*.txt" and find . -name "*.txt" -print ?

I mean what is the use of print in find. I see that it prints the results anyway so why is this option available?

share|improve this question

In very old versions of find, -print wasn't implicit so was required.

Nowadays, it is the default action but is still useful when combined with -prune to avoid the default action to encompass the pruning. eg:

This won't print files named foo under /tmp:

find /tmp -name foo -prune -o -type f -print

This will:

find /tmp -name foo -prune -o -type f
share|improve this answer
In the following nothing is printed find . -type f \( -name ".vim" -prune \) -print. Why? – Jim Jun 29 '13 at 21:37

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.