Answer the question
In order to leave comments, you need to log in
How to write script in linux to delete folders with %date% variable?
There is a backup server on Ubuntu, dumps of 1s bases are dumped onto it every night into folders with the% date% variable (dumps weigh about 12 gigs a day), that is, for example, the folder is 05/28/2017 and dumps are in it, respectively, the folder will be created next night 05/29/2017 and dumps for this day and so on will be placed there. It is logical to assume that the space on the railway will someday run out, so I’m thinking how to write a script that would clean up old folders, and leave at least a pool of folders for a month (approximately 30 pieces), I will be glad for any comments
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question