Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Illegal option" error when using find on macOS

I am trying to list the files only with the letter "R" at the end. I used find as follows in macOS Terminal,

find -type f -name '*R'  

But I got the message saying illegal option --t.

like image 671
Gravity M Avatar asked Sep 15 '14 04:09

Gravity M


1 Answers

The first argument to find is the path where it should start looking. The path . means the current directory.

find . -type f -name '*R' 

You must provide at least one path, but you can actually provide as many as you want:

find ~/Documents ~/Library -type f -name '*R' 
like image 190
rob mayoff Avatar answered Sep 20 '22 15:09

rob mayoff