14
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

指定ディレクトリ配下のpycファイルを全て削除する

Posted at

指定ディレクトリ配下のpycファイルを全て削除する

削除コマンド

$ find <directory name> -name '*.pyc' -delete

例)~/projectディレクトリ配下の全てのpycファイル削除

# 検索
$ find ~/project -name *.pyc
/Users/xxx/project/django1.5/mysite/mysite/__init__.pyc
/Users/xxx/project/django1.5/mysite/mysite/settings.pyc
/Users/xxx/project/django1.5/mysite/mysite/urls.pyc
/Users/xxx/project/django1.5/mysite/mysite/wsgi.pyc
# 削除
$ find ~/project -name *.pyc -delete
# 検索
$ find ~/project -name *.pyc
なし
14
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?