1. 程式人生 > >linux find之exec用法

linux find之exec用法

find命令之exec
-exec引數後面跟的是command命令,它是以 ; 為結束標誌,由於各個系統中分號會有不同的意義,因此在前面加上反斜槓。
{} 代表前面find查找出來的檔名

[[email protected] study]$ find ./ -type f -exec ls -l {} \;
-rwxrwxr-x. 1 danni danni 939 Sep 20 18:52 ./test.sh
-rw-rw-r--. 1 danni danni 556 Oct 13 22:48 ./test.txt