Frage

Currently, I'm trying to use the date command (NOT crontab) to manually download a file that is uploaded to a server every five minutes.

I realize that date -u +%M --date="5 minutes ago" will display the time from 5 minutes ago but, I'm looking for a way to go back in 5 minute increments.

War es hilfreich?

Lösung

That 5 can be any number:

for n in {0..1440..5}; do date -u --date="$n minutes ago"; done
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top