Skip to content

Instantly share code, notes, and snippets.

@donchan922
Last active December 4, 2019 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donchan922/d83271ca8465d8f7c259dd77e0b53efe to your computer and use it in GitHub Desktop.
Save donchan922/d83271ca8465d8f7c259dd77e0b53efe to your computer and use it in GitHub Desktop.
# ルートディレクトリ配下の30日以上前の.logファイルを検索する
$ find / -type f -name "*.log" -mtime +30 -exec ls -l {} \;
# ルートディレクトリ配下の30日以上前の.logファイルを削除する
$ find / -type f -name "*.log" -mtime +30 -exec rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment