문제

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.

도움이 되었습니까?

해결책

That 5 can be any number:

for n in {0..1440..5}; do date -u --date="$n minutes ago"; done
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top