> ## Content Index
> Fetch the complete content index at: https://www.workroom-productions.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Recent Events
- URL: https://www.workroom-productions.com/recent-events/
- Published: 2025-10-21T15:32:54.000Z
- Updated: 2025-10-21T15:34:38.000Z
- Description: Shows me changes to recently-changed logs
- Author: James Lyndsay
- Tags: tiny tool

I wanted to see the most-recent entries of the most-recent logs.

`ls -1td /var/log/*.log | head -3 | xargs -I {} sh -c 'tail -10 "{}"'`

This uses:

- `ls` to make a list of files (with paths) sorted by recency
- `head` to clip the top 3
- `xargs` to run those three into `tail` to pick up the bottom 10 lines.

Wrinkle 1 – listing with the paths means `xargs` doesn't need to be passes the path of the files.

Wrinkle 2 – `{}` is something uncommon to use as a pattern – no more. But it's a common pair to use, when finding things to sub for in commandline things. Presumably no use in javascript code...

This alternative separates the logs – easier to use.

`ls -1td /var/log/*.log | head -3 | xargs -I {} sh -c 'echo "=== {} ==="; tail -10 "{}"'`