I have an application server that produces daily log on the following format:
access_log.{Y-m-d}
So I want to execute a command in a way like this:
tail -f access_log.{+%Y-%m-%d}
Is there any way to do a in single line without creating variables ?
在这里找到
tail -f "access_log.$(date '+%Y-%m-%d')"
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.