Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Shell Script to delete a folder that is more then

scmuser created the topic: Shell Script to delete a folder that is more then
Shell Script to delete a folder that is more then 1 week old

Hi all,
i have this scritp
set -x
cd /var/log/
direc=”bkp_`date +%F`”
mkdir $direc
cp /var/log/*.log /tmp/bkp.

Here im ok, what i need is a scritp to check if i have a folder that is more then 1 week to delete it.
Any help please?

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x