The following command will delete the files before certain date
hadoop fs -ls shakespeare | tail -n+2 | xargs -n 8 | awk '{ if ( ($(date)-$(date -d $6)) == 0)
cmd="hadoop fs -rm " $8;
system(cmd)
}
hadoop fs -ls shakespeare | tail -n+2 | xargs -n 8 | awk '{ if ( ($(date)-$(date -d $6)) == 0)
cmd="hadoop fs -rm " $8;
system(cmd)
}
this is in spanish, well known, as "chapuza"
ReplyDelete