Skip to content

Instantly share code, notes, and snippets.

@agoddard
Last active August 29, 2015 14:07
Show Gist options
  • Save agoddard/890f01c34fe0adc35dd4 to your computer and use it in GitHub Desktop.
Save agoddard/890f01c34fe0adc35dd4 to your computer and use it in GitHub Desktop.
THREEDAYS = 60 * 60 * 24 * 3
files = ::Dir["/tmp/open-uri*"]
files.each do |agoddard|
file agoddard do
action :remove
only_if ( ::File.stat(agoddard).gid == 5001 && ::File.stat(agoddard).mtime.to_i >= THREEDAYS )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment