hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uma Maheswara Rao G <mahesw...@huawei.com>
Subject RE: How to delete files older than X days in HDFS/Hadoop
Date Sat, 26 Nov 2011 15:16:22 GMT
AFAIK, there is no facility like this in HDFS through command line.
One option is, write small client program and collect the files from root based on your condition
and invoke delete on them.

Regards,
Uma
________________________________________
From: Raimon Bosch [raimon.bosch@gmail.com]
Sent: Saturday, November 26, 2011 8:31 PM
To: common-user@hadoop.apache.org
Subject: How to delete files older than X days in HDFS/Hadoop

Hi,

I'm wondering how to delete files older than X days with HDFS/Hadoop. On
linux we can do it with the folowing command:

find ~/datafolder/* -mtime +7 -exec rm {} \;

Any ideas?

Mime
View raw message