作者careyjou (股市崩盤前夕)
看板LinuxDev
標題Re: [問題] 請問如何對目錄裡所有的檔案作script?
時間Tue Oct 28 00:44:58 2008
※ 引述《awaysu (阿偉蘇)》之銘言:
: 可以請問各位大大
: 因為自己對shell script不熟
: 想請問各位~
: 我想對目錄裡的檔案作strip的動作
: 可以請教shell script要如何寫?
: 另外可以做到對目錄裡的所有目錄的檔案作strip嗎?
: 感謝~
用 find 應該可以吧。
find . -type f -exec strip {} \;
script 裡面加這個試試。
指令沒很熟,不知道有沒有錯。
你先去google一下find的指令吧。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.230.9.183
→ elpam:用xargs應該也可以吧~ find . -name "*.so"|xargs strip 10/28 07:25
→ antontw:type f ,那連 *.c 也一起做 strip ?不管 error ? 10/28 07:26
→ antontw:應該在 makefile 裡面做, 才是正解吧? 10/28 07:26