![check delete files log mac check delete files log mac](http://1.bp.blogspot.com/-wHAcTg0_-Wc/UWZXR-0r_sI/AAAAAAAACaE/n09GsU5rN9g/s1600/r.png)
All the methods return time in seconds since the epoch. We have a method called stat in the os module that gives details of last access (st_atime), modification (st_mtime), and metadata modification (st_ctime) time. Often you don’t need old logs, and you regularly need to clean them to make storage available. Note: the following are tested on Python 3.6+ Removing files/folders older than X days Writing scripts for completing a specific system task is a cupcake if you know Python.
![check delete files log mac check delete files log mac](https://nektony.com/wp-content/uploads/2020/06/grammarly-extension-320x215.png)
We can replace any annoying or repetitive system tasks using Python. We are going to use this module to complete our automation of deleting the files.
CHECK DELETE FILES LOG MAC CODE
You can run the same code in Windows, Linux, and Mac.