Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In the command find theres a switch called name but it doesn't exist in OS X, whats the equivalent switch for OS X?

share|improve this question
2  
It's the same. Use "find . -name ..." -- you need to use directory where to search before other expressions like -name. –  Peter Štibraný Feb 20 '12 at 11:30
    
You should have provided this as an answer Peter –  conorgriffin Feb 20 '12 at 11:56
add comment

1 Answer

up vote 2 down vote accepted

Actually you can use the find command as in unix e.g.: find . -name "*.log"

At least on all of my mac systems works this.

see 'man find':

-name pattern
         True if the last component of the pathname being examined matches
         pattern.  Special shell pattern matching characters (``['',
         ``]'', ``*'', and ``?'') may be used as part of pattern.  These
         characters may be matched explicitly by escaping them with a
         backslash (``\'').
share|improve this answer
    
My mistake kept thinking it was like a switch not an option so was putting my directory after it causing it to error. –  Dean Feb 20 '12 at 11:35
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.