简体   繁体   中英

sendemail most recent file attachment

I am using sendemail to send a log report and file attachment from a number of cron jobs. everything is going perfectly but what I would like to do is to attach the most recent file ie the newest file from the specific folder. Is there a command for this or a way to pipe the execution.

要在当前文件夹中找到最新文件:

 $ ls -t | sed q

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM