Skip to content

Instantly share code, notes, and snippets.

@l1x
Created November 15, 2017 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/6aa54930b781f56b6d38a8fd2d8461f1 to your computer and use it in GitHub Desktop.
Save l1x/6aa54930b781f56b6d38a8fd2d8461f1 to your computer and use it in GitHub Desktop.
Delete files that are older than X days
COMMAND='hadoop jar /opt/cloudera/parcels/CDH/lib/solr/contrib/mr/search-mr-job.jar org.apache.solr.hadoop.HdfsFindTool'
${COMMAND} -find /tmp/ -type f -mtime +30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment