指令「find . -type f -size 1033c ! -executable -exec file {} + | grep ASCII」中「{} +」的意義

指令「find . -type f -size 1033c ! -executable -exec file {} + | grep ASCII」中「{} +」的意義

{} +這個命令中有什麼意義呢?

find . -type f -size 1033c ! -executable -exec file {} + |
grep ASCII

你能透過分解指令來向我解釋它的作用嗎?我是一個菜鳥。

答案1

{} +表示找到的檔案/目錄的集合。

例如:

find . -type d -empty -exec rmdir {} + ;

這將找到空目錄並運行rmdir DIRNAME1 DIRNAME2 ....

相關內容