0

(Ubuntu Server)

I have a folder full of files in pairs (one is a log, another is a DB backup) They are basically create/modified at the same time.

I need a shell script that detects if the folder has more than 28 or 30 files (always will be a pair), it deletes the oldest two.

What is the quickest way to do this?

2
Contributors
3
Replies
22
Views
4 Months
Discussion Span
Last Post by rproffitt
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.