marr weblog
learning to lead a life of awareness.
2008/06/19
Find and Remove Files
$ find . -name "*.pyc" -type f -print0 | xargs -0 /bin/rm -f
一般情況 find 預設使用 -print 參數,如果擔心找到的檔名含有空白、換行等符號,使用 -print0 較安全,而且搭配 xargs 時會使用 -0 參數。
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
‹
›
Home
View web version
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.