Unix find command, what are the {} and \; for?

后端 未结 5 980
慢半拍i
慢半拍i 2020-11-28 15:22

With this set of commands, what are the {} and \\; characters for?

find . -name \'*.clj\' -exec grep -r resources {} \\;
         


        
5条回答
  •  清酒与你
    2020-11-28 15:50

    In find, the -exec parameter grabs the rest of the parameters up til the ; (semicolon) which has to be escaped, hence the \;. Within this span, {} is replaced with the filename being inspected.

提交回复
热议问题