0

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 ?

Fabrizio Stellato
  • 1,727
  • 21
  • 52
  • Possible duplicate of [creating tar file and naming by current date](https://stackoverflow.com/questions/18498359/creating-tar-file-and-naming-by-current-date) – tripleee Nov 24 '17 at 05:58

1 Answers1

0

Found here

tail -f "access_log.$(date '+%Y-%m-%d')"
chepner
  • 497,756
  • 71
  • 530
  • 681
Fabrizio Stellato
  • 1,727
  • 21
  • 52