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 .
那个5可以是任何数字:
for n in {0..1440..5}; do date -u --date="$n minutes ago"; done
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.