User Tools

Site Tools


python:folder_cleaner

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
python:folder_cleaner [2016/02/03 06:50]
admin [Usage]
python:folder_cleaner [2016/02/03 06:51]
admin [Code]
Line 19: Line 19:
 Script to clean up unrecognized folder of older files. Script to clean up unrecognized folder of older files.
 It can be used from CLI or as a cronjob. It can be used from CLI or as a cronjob.
- 
-Usage: 
-    ./​unrecognized_cleanup.py - runs with the default settings (log to file, keep no files) 
-    ./​unrecognized_cleanup.py -k 10 - keep the last 10 days of files 
-    ./​unrecognized_cleanup.py --keep 10 --stdlog - keep 10 days and log to console 
 """​ """​
 __author__ = "​Cristian Navalici"​ __author__ = "​Cristian Navalici"​
Line 47: Line 42:
 LOG_FOLDER = '/​tmp/​logfiles'​ LOG_FOLDER = '/​tmp/​logfiles'​
  
-# after how many file shall we log an intermediate message+# after how many files shall we log an intermediate message
 LOG_MILESTONE = 10000 LOG_MILESTONE = 10000
  
python/folder_cleaner.txt ยท Last modified: 2016/02/03 07:15 by admin