Find Exec

find [path] [expression]
ex:
find . -name *.c -exec ls -l {} \;
find . \( -name a.out -o -name *.core \) -exec rm -f {} \;
find /var -path "/var/log" -prune -o -name file
#不搜尋/var/log下的檔案
#-prune表示在某目錄下找到檔案後,便不再其中往下層找
find /home/ -name *.c -exec mv {} /home/xxx/ \;

cmd | awk '{ print $n }'
#輸出cmd第n個欄位

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License