Skip to content

Instantly share code, notes, and snippets.

@yllan
Created February 21, 2011 04:41
Show Gist options
  • Save yllan/836665 to your computer and use it in GitHub Desktop.
Save yllan/836665 to your computer and use it in GitHub Desktop.
#!/bin/bash
. /etc/bashrc
. /etc/profile
TWO_DAYS_AGO=`date --date='2 day ago' +%Y-%m-%d` # Linux
#TWO_DAYS_AGO=`date -v -2d +%Y-%m-%d` # BSD
/mnt/lib/hadoop/bin/hadoop fs -lsr /log_data/out | awk -F/ 'NF == 5' | awk "\$6 < \"$TWO_DAYS_AGO\"" | awk '{print $8}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment