Cobra Forum

Linux => New to Ubuntu => Topic started by: mahesh on Sep 20, 2023, 05:44 AM

Title: script modification
Post by: mahesh on Sep 20, 2023, 05:44 AM
running 21.10

the below is a crontab script that runs daily. it backs uo my crontab jobs.


#!/bin/bash
crontab -l > $HOME/crontabBackup-`date +"%d-%m-%Y"`


how to i modify so that when it runs it deletes the previous days backup

tks
quote:He that would live in peace & at ease, Must not speak all he knows,nor judge all he sees.'