LinuxCommands


Linux Commands

Top is a good tool for viewing system processes

However there is another one with a little bit more information called Htop

AgedFiles.py

import os

directory = '/home/ubuntu/FilestoDelete'

os.system("find " + directory + " -mtime +60 -print")
which python will show python version
set up a cron job
crontab -e
this will run the job at 5 am every day

* 5 * * *  /usr/bin/python  /home/ubuntu/AgedFiles.py

other option is to call the python script from a bash script

trigger.sh

#!/bin/bash
/usr/bin/python  /home/ubuntu/AgedFiles.py
Save it and then run the below

./trigger.sh

These writings represent my own personal views alone.
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.