Skip to content

Instantly share code, notes, and snippets.

@DaffyDuke
Last active March 4, 2017 15:17
Show Gist options
  • Save DaffyDuke/44c49a6163839c46dcf8c62ed21d6d29 to your computer and use it in GitHub Desktop.
Save DaffyDuke/44c49a6163839c46dcf8c62ed21d6d29 to your computer and use it in GitHub Desktop.
Puppet: List Changed Files

Source : http://lzone.de/blog/Puppet:%20List%20Changed%20Files

If you want to know which files where changed by puppet in the last days:

cd /var/lib/puppet
for i in $(find clientbucket/ -name paths); do
	echo "$(stat -c %y $i | sed 's/\..*//')       $(cat $i)";
done | sort -n

will give you an output like

[...]
2015-02-10 12:36:25       /etc/resolv.conf
2015-02-17 10:52:09       /etc/bash.bashrc
2015-02-20 14:48:18       /etc/snmp/snmpd.conf
2015-02-20 14:50:53       /etc/snmp/snmpd.conf
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment