crontab 中带有时间戳的 RM 输出日志

RM output log with timestamp in crontab

如何在 crontab 中 运行 RM 时为详细标志添加时间戳?

0 06 * * *  rm -v /somePath/FileToDelete > /somePath/filetoLog.log

一种方法是显式调用 date

0 06 * * *  (date && rm -v /somePath/FileToDelete) > /somePath/filetoLog.log