Find command

Posted on 2004-11-27
Last Modified: 2013-12-27
I have this command, it finds the number of files in a directory and it's sub directories however there is a lot of files in the sub directories that end in   .tmp and I need
to get the total number of files that is in all sub directories together but Not counting the files that end in   .tmp


find /opt/iplanet/ms5/mail/imta/queue/conversion/ -type f | wc -l

Question by:bt707
    LVL 13

    Accepted Solution

    find /opt/iplanet/ms5/mail/imta/queue/conversion/ -type f | egrep -v '\.tmp$' | wc -l

    Author Comment

    Thanks again gripe, don't know how you do that so fast but worked great and was a really fast answer, hardly even got time to refresh the page.

    Thanks again
    LVL 13

    Expert Comment

    Props to ameba's QuickPost :)

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. Please see for the updated article. It is avail…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now