“Illegal option” error when using find on macOS

前端 未结 1 811
感情败类
感情败类 2021-02-05 01:45

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\' 

1条回答
  •  礼貌的吻别
    2021-02-05 02:25

    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'
    

    0 讨论(0)
提交回复
热议问题