findã®execã便å©
ãããã£ã¬ã¯ããªé ä¸ã®å ¨ã¦ã®.svnéãæ¶ãå»ããã¨ãã¦ããã§ãããããããã¹ã¯ãªããæ¸ãã®ãä½ã ããªããã¨æã£ã¦ãããfindã«-execã¨ãããªãã·ã§ã³ãæãã®ãã¯ããããªããåãã¦ç¥ãã¾ããã
ããã¥ã¢ã«
-exec command ; command ãå®è¡ãããã³ãã³ãã®æ»ãå¤ã 0 ãªãã°çã find ã®ã³ãã³ãã©ã¤ã³ã§æå®ããããã以éã®å¼ãæ°ã¯ã `;' ãå«ãå¼ãæ°ã«ãããã¾ã§ããã¹ã¦command ã®å¼ãæ°ã¨ã¿ãªãããã æåå `{}' ã¯ç¾å¨å¦çãã¦ãããã¡ã¤ã«åã«ç½®ãæããããã ãã㯠command å¼ãæ°ã®ã©ãã«ãã£ã¦ããããåç¬ã§ç½®ããã¦ããªãã¦ããã (åç¬ã§ç½®ããã¦ããªããã°ãªããªããã㪠find ããã)ã ãããã®æåã¯ã·ã§ã«ã«ãã£ã¦å±éãããªãããã `\' ã«ãã£ã¦ã¨ã¹ã±ã¼ããããå¼ç¨ç¬¦ã§å²ãå¿ è¦ãããã ã³ãã³ã㯠find ãå®è¡ãããã£ã¬ã¯ããªããå®è¡ãããã
ã¨ã®äºã§ã{}ããããããããã¹ã¸ã¨å¤æããã¾ããã§âã§ãã§ããå ¨é¨æ¶ãã¾ãããè²ã ã¨å¿ç¨ã§ãããã§ããªã
find ./ -name ".svn" -exec rm -rf {} \;