↑ ↓ select, Enter open, Esc close

Show Docker container logs for a time range

Adjust the values, the command updates live
root@server
docker logs -t --since 2h --until 1h app

Filters the container logs to a time window and prefixes each line with a timestamp via -t. --since and --until accept relative values like 30m or 2h as well as absolute times like 2026-10-09T08:00:00. The example shows everything between two hours ago and one hour ago.

Note: To search the output, filter it with 2>&1 | grep -i fehler (replace the search term as needed), since Docker passes the container’s error output on to stderr.

Also searched as

  • docker logs since until
  • docker logs between two times
  • show docker logs last 2 hours

Related one-liners

All in Docker

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.