Re: Delete a folder name containing *

2014-08-21 Thread varun kumar
Make sure namenode is not in safe mode. On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar praveen...@gmail.com wrote: Hi team I am in weird situation where I have following HDFS sample folders /data/folder/ /data/folder* /data/folder_day /data/folder_day/monday /data/folder/1

RE: Delete a folder name containing *

2014-08-21 Thread Liu, Yi A
Escape character is \, but please enclose with single quote For example /foo/{123} should be '/foo/\{123\}' Regards, Yi Liu From: varun kumar [mailto:varun@gmail.com] Sent: Thursday, August 21, 2014 2:21 PM To: user; praveen...@gmail.com Subject: Re: Delete a folder name containing * Make

Delete a folder name containing *

2014-08-20 Thread praveenesh kumar
Hi team I am in weird situation where I have following HDFS sample folders /data/folder/ /data/folder* /data/folder_day /data/folder_day/monday /data/folder/1 /data/folder/2 I want to delete /data/folder* without deleting its sub_folders. If I do hadoop fs -rmr /data/folder* it will delete

Re: Delete a folder name containing *

2014-08-20 Thread dileep kumar
Just Rename the folder. On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar praveen...@gmail.com wrote: Hi team I am in weird situation where I have following HDFS sample folders /data/folder/ /data/folder* /data/folder_day /data/folder_day/monday /data/folder/1 /data/folder/2 I want

Re: Delete a folder name containing *

2014-08-20 Thread praveenesh kumar
With renaming - you would use the mv command hadoop fs -mv /data/folder* /data/new_folder. Won't it move all the sub_dirs along with that ? On Wed, Aug 20, 2014 at 12:00 PM, dileep kumar dileep...@gmail.com wrote: Just Rename the folder. On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar

Re: Delete a folder name containing *

2014-08-20 Thread Ritesh Kumar Singh
try putting the name in quotes On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar praveen...@gmail.com wrote: With renaming - you would use the mv command hadoop fs -mv /data/folder* /data/new_folder. Won't it move all the sub_dirs along with that ? On Wed, Aug 20, 2014 at 12:00 PM, dileep

Re: Delete a folder name containing *

2014-08-20 Thread dileep kumar
Try hadoop fs -mv /data/folder*/* new folder Now you have only /data/folder*. and all data under /data/folder* will be moved to new folder ,then delete /data/folder*.Not sure if it works. just make a try. On Wed, Aug 20, 2014 at 8:26 AM, Ritesh Kumar Singh riteshoneinamill...@gmail.com wrote:

Re: Delete a folder name containing *

2014-08-20 Thread praveenesh kumar
No, I have tried all usual things like single quotes, double quotes, escape character.. but it is not working. I wonder what is escape char with Hadoop FS utility. On Wed, Aug 20, 2014 at 1:26 PM, Ritesh Kumar Singh riteshoneinamill...@gmail.com wrote: try putting the name in quotes On

Re: Delete a folder name containing *

2014-08-20 Thread Ritesh Kumar Singh
interesting ... although escape character is still the forward slash and its proven to work with other special characters. Here's a link: Deleting directory with special character

Re: Delete a folder name containing *

2014-08-20 Thread Ritesh Kumar Singh
use this: hadoop fs -rmr /path-to-folder/folder\* just tried it out :) On Wed, Aug 20, 2014 at 7:07 PM, Ritesh Kumar Singh riteshoneinamill...@gmail.com wrote: interesting ... although escape character is still the forward slash and its proven to work with other special characters. Here's

Re: Delete a folder name containing *

2014-08-20 Thread praveenesh kumar
Not working for me, strange :( On Wed, Aug 20, 2014 at 3:00 PM, Ritesh Kumar Singh riteshoneinamill...@gmail.com wrote: use this: hadoop fs -rmr /path-to-folder/folder\* just tried it out :) On Wed, Aug 20, 2014 at 7:07 PM, Ritesh Kumar Singh riteshoneinamill...@gmail.com wrote:

Re: Delete a folder name containing *

2014-08-20 Thread hadoop hive
Move it to some tmp directory and delete parent directory. On Aug 20, 2014 4:23 PM, praveenesh kumar praveen...@gmail.com wrote: Hi team I am in weird situation where I have following HDFS sample folders /data/folder/ /data/folder* /data/folder_day /data/folder_day/monday /data/folder/1

Re: Delete a folder name containing *

2014-08-20 Thread Ritesh Kumar Singh
just to be sure, try this one too: hadoop fs -rmr /data/folder\* On Thu, Aug 21, 2014 at 1:36 AM, praveenesh kumar praveen...@gmail.com wrote: Command used - 1. hadoop fs -rmr /data/folder\* 2. hadoop fs -rmr 'data/folder\*' 3. hadoop fs -rmr /data/folder\* None of them gave any output.