S
sanjeev.sagar
Hello All,
I have structure like below
dira/backup-050105
dira/backup-050805
dirb/backup-050105
dirb/backup-050805
..
..
..
dirf/backup-050105
dirf/backup-050805
When the third backup arrive in the respective directories, i need to
delete the first old backup dir i.e
if dira/backup-051505 arrives, need to delete dira/backup-050105. same
requirement for all others direcotries i.e. dirb, dirc...dirf too.
I am kind a lost in finalizing the approach to acheive this. I tried to
use linux find command or perl File::Find to extract the first old
directory by using -mtime for 21 days but did not work because files
underneath those directory are with original timestamp and they are
over 21 days old.
Any help will be highly appreciable.
I just need to know that what is the best way to find out the first old
directory name, so that i can remove it.
Appreciate it.
I have structure like below
dira/backup-050105
dira/backup-050805
dirb/backup-050105
dirb/backup-050805
..
..
..
dirf/backup-050105
dirf/backup-050805
When the third backup arrive in the respective directories, i need to
delete the first old backup dir i.e
if dira/backup-051505 arrives, need to delete dira/backup-050105. same
requirement for all others direcotries i.e. dirb, dirc...dirf too.
I am kind a lost in finalizing the approach to acheive this. I tried to
use linux find command or perl File::Find to extract the first old
directory by using -mtime for 21 days but did not work because files
underneath those directory are with original timestamp and they are
over 21 days old.
Any help will be highly appreciable.
I just need to know that what is the best way to find out the first old
directory name, so that i can remove it.
Appreciate it.