Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> How to delete files older than X days in HDFS/Hadoop


Copy link to this message
-
RE: How to delete files older than X days in HDFS/Hadoop
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 [[EMAIL PROTECTED]]
Sent: Saturday, November 26, 2011 8:31 PM
To: [EMAIL PROTECTED]
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?