Skip to content

Python script that will empty files matching a user-defined file path and extension.

Notifications You must be signed in to change notification settings

m-buck/Truncate-Logs-RPi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Truncate-Logs-RPi

Python script that will empty files matching a user-defined file path and extension. Can be used with a cron job to regularly truncate logs or other file types.

Getting started

Set file path: path = "/home/pi/"

Set file extension ext = glob.glob('*.log')

Run the script python truncate_logs.py

About

Python script that will empty files matching a user-defined file path and extension.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages