You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by praveenesh kumar <pr...@gmail.com> on 2014/08/20 12:53:15 UTC

Delete a folder name containing *

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 everything which I want to
avoid. I tried with escape character \ but HDFS FS shell is not taking it.
Any hints/tricks ?


Regards
Praveenesh

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
just to be sure, try this one too:

hadoop fs -rmr /data/"folder\*"


On Thu, Aug 21, 2014 at 1:36 AM, praveenesh kumar <pr...@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. Hadoop version - 1.0.2
>
>
> On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
> riteshoneinamillion@gmail.com> wrote:
>
>> what's the exact command you are using(with escape and quotes)?
>> And what's the output after execution?
>>
>>
>> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com>
>> wrote:
>>
>>> Move it to some tmp directory and delete parent directory.
>>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
just to be sure, try this one too:

hadoop fs -rmr /data/"folder\*"


On Thu, Aug 21, 2014 at 1:36 AM, praveenesh kumar <pr...@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. Hadoop version - 1.0.2
>
>
> On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
> riteshoneinamillion@gmail.com> wrote:
>
>> what's the exact command you are using(with escape and quotes)?
>> And what's the output after execution?
>>
>>
>> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com>
>> wrote:
>>
>>> Move it to some tmp directory and delete parent directory.
>>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
just to be sure, try this one too:

hadoop fs -rmr /data/"folder\*"


On Thu, Aug 21, 2014 at 1:36 AM, praveenesh kumar <pr...@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. Hadoop version - 1.0.2
>
>
> On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
> riteshoneinamillion@gmail.com> wrote:
>
>> what's the exact command you are using(with escape and quotes)?
>> And what's the output after execution?
>>
>>
>> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com>
>> wrote:
>>
>>> Move it to some tmp directory and delete parent directory.
>>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
just to be sure, try this one too:

hadoop fs -rmr /data/"folder\*"


On Thu, Aug 21, 2014 at 1:36 AM, praveenesh kumar <pr...@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. Hadoop version - 1.0.2
>
>
> On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
> riteshoneinamillion@gmail.com> wrote:
>
>> what's the exact command you are using(with escape and quotes)?
>> And what's the output after execution?
>>
>>
>> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com>
>> wrote:
>>
>>> Move it to some tmp directory and delete parent directory.
>>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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. Hadoop version - 1.0.2


On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
riteshoneinamillion@gmail.com> wrote:

> what's the exact command you are using(with escape and quotes)?
> And what's the output after execution?
>
>
> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:
>
>> Move it to some tmp directory and delete parent directory.
>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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. Hadoop version - 1.0.2


On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
riteshoneinamillion@gmail.com> wrote:

> what's the exact command you are using(with escape and quotes)?
> And what's the output after execution?
>
>
> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:
>
>> Move it to some tmp directory and delete parent directory.
>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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. Hadoop version - 1.0.2


On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
riteshoneinamillion@gmail.com> wrote:

> what's the exact command you are using(with escape and quotes)?
> And what's the output after execution?
>
>
> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:
>
>> Move it to some tmp directory and delete parent directory.
>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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. Hadoop version - 1.0.2


On Wed, Aug 20, 2014 at 7:26 PM, Ritesh Kumar Singh <
riteshoneinamillion@gmail.com> wrote:

> what's the exact command you are using(with escape and quotes)?
> And what's the output after execution?
>
>
> On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:
>
>> Move it to some tmp directory and delete parent directory.
>> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
what's the exact command you are using(with escape and quotes)?
And what's the output after execution?


On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:

> Move it to some tmp directory and delete parent directory.
> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
what's the exact command you are using(with escape and quotes)?
And what's the output after execution?


On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:

> Move it to some tmp directory and delete parent directory.
> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
what's the exact command you are using(with escape and quotes)?
And what's the output after execution?


On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:

> Move it to some tmp directory and delete parent directory.
> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
what's the exact command you are using(with escape and quotes)?
And what's the output after execution?


On Wed, Aug 20, 2014 at 9:33 PM, hadoop hive <ha...@gmail.com> wrote:

> Move it to some tmp directory and delete parent directory.
> On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>

Re: Delete a folder name containing *

Posted by hadoop hive <ha...@gmail.com>.
Move it to some tmp directory and delete parent directory.
On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
Not working for me, strange :(


On Wed, Aug 20, 2014 at 3:00 PM, Ritesh Kumar Singh <
riteshoneinamillion@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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> 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
>> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>>
>>
>>
>>
>> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
>> wrote:
>>
>>> 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 <
>>> riteshoneinamillion@gmail.com> wrote:
>>>
>>>> try putting the name in quotes
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <praveenesh@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 kumar <di...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Just Rename the folder.
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If
>>>>>>> I do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>>> Any hints/tricks ?
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Praveenesh
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
Not working for me, strange :(


On Wed, Aug 20, 2014 at 3:00 PM, Ritesh Kumar Singh <
riteshoneinamillion@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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> 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
>> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>>
>>
>>
>>
>> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
>> wrote:
>>
>>> 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 <
>>> riteshoneinamillion@gmail.com> wrote:
>>>
>>>> try putting the name in quotes
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <praveenesh@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 kumar <di...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Just Rename the folder.
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If
>>>>>>> I do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>>> Any hints/tricks ?
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Praveenesh
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
Not working for me, strange :(


On Wed, Aug 20, 2014 at 3:00 PM, Ritesh Kumar Singh <
riteshoneinamillion@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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> 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
>> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>>
>>
>>
>>
>> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
>> wrote:
>>
>>> 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 <
>>> riteshoneinamillion@gmail.com> wrote:
>>>
>>>> try putting the name in quotes
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <praveenesh@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 kumar <di...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Just Rename the folder.
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If
>>>>>>> I do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>>> Any hints/tricks ?
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Praveenesh
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
Not working for me, strange :(


On Wed, Aug 20, 2014 at 3:00 PM, Ritesh Kumar Singh <
riteshoneinamillion@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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> 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
>> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>>
>>
>>
>>
>> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
>> wrote:
>>
>>> 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 <
>>> riteshoneinamillion@gmail.com> wrote:
>>>
>>>> try putting the name in quotes
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <praveenesh@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 kumar <di...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Just Rename the folder.
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If
>>>>>>> I do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>>> Any hints/tricks ?
>>>>>>>
>>>>>>>
>>>>>>> Regards
>>>>>>> Praveenesh
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> 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
> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>
>
>
>
> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
> wrote:
>
>> 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 <
>> riteshoneinamillion@gmail.com> wrote:
>>
>>> try putting the name in quotes
>>>
>>>
>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>>> wrote:
>>>>
>>>>> Just Rename the folder.
>>>>>
>>>>>
>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>> Any hints/tricks ?
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> Praveenesh
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> 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
> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>
>
>
>
> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
> wrote:
>
>> 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 <
>> riteshoneinamillion@gmail.com> wrote:
>>
>>> try putting the name in quotes
>>>
>>>
>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>>> wrote:
>>>>
>>>>> Just Rename the folder.
>>>>>
>>>>>
>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>> Any hints/tricks ?
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> Praveenesh
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> 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
> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>
>
>
>
> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
> wrote:
>
>> 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 <
>> riteshoneinamillion@gmail.com> wrote:
>>
>>> try putting the name in quotes
>>>
>>>
>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>>> wrote:
>>>>
>>>>> Just Rename the folder.
>>>>>
>>>>>
>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>> Any hints/tricks ?
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> Praveenesh
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> 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
> <http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>
>
>
>
>
> On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
> wrote:
>
>> 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 <
>> riteshoneinamillion@gmail.com> wrote:
>>
>>> try putting the name in quotes
>>>
>>>
>>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>>> wrote:
>>>>
>>>>> Just Rename the folder.
>>>>>
>>>>>
>>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <
>>>>> praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>>> Any hints/tricks ?
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> Praveenesh
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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
<http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>




On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
wrote:

> 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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> try putting the name in quotes
>>
>>
>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>> wrote:
>>>
>>>> Just Rename the folder.
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>> Any hints/tricks ?
>>>>>
>>>>>
>>>>> Regards
>>>>> Praveenesh
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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
<http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>




On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
wrote:

> 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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> try putting the name in quotes
>>
>>
>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>> wrote:
>>>
>>>> Just Rename the folder.
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>> Any hints/tricks ?
>>>>>
>>>>>
>>>>> Regards
>>>>> Praveenesh
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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
<http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>




On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
wrote:

> 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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> try putting the name in quotes
>>
>>
>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>> wrote:
>>>
>>>> Just Rename the folder.
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>> Any hints/tricks ?
>>>>>
>>>>>
>>>>> Regards
>>>>> Praveenesh
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
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
<http://stackoverflow.com/questions/13529114/how-to-delete-a-directory-from-hadoop-cluster-which-is-having-comma-in-its-na>




On Wed, Aug 20, 2014 at 6:22 PM, praveenesh kumar <pr...@gmail.com>
wrote:

> 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 <
> riteshoneinamillion@gmail.com> wrote:
>
>> try putting the name in quotes
>>
>>
>> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>>> wrote:
>>>
>>>> Just Rename the folder.
>>>>
>>>>
>>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <praveenesh@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 to delete /data/folder* without deleting its sub_folders. If I
>>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>>> Any hints/tricks ?
>>>>>
>>>>>
>>>>> Regards
>>>>> Praveenesh
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
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 <
riteshoneinamillion@gmail.com> wrote:

> try putting the name in quotes
>
>
> On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
>> wrote:
>>
>>> Just Rename the folder.
>>>
>>>
>>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I
>>>> do hadoop fs -rmr /data/folder* it will delete everything which I want to
>>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>>> Any hints/tricks ?
>>>>
>>>>
>>>> Regards
>>>> Praveenesh
>>>>
>>>
>>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
try putting the name in quotes


On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
> wrote:
>
>> Just Rename the folder.
>>
>>
>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
try putting the name in quotes


On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
> wrote:
>
>> Just Rename the folder.
>>
>>
>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
try putting the name in quotes


On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
> wrote:
>
>> Just Rename the folder.
>>
>>
>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>>
>

Re: Delete a folder name containing *

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
try putting the name in quotes


On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <pr...@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 kumar <di...@gmail.com>
> wrote:
>
>> Just Rename the folder.
>>
>>
>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>>> Any hints/tricks ?
>>>
>>>
>>> Regards
>>> Praveenesh
>>>
>>
>>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <di...@gmail.com> wrote:

> Just Rename the folder.
>
>
> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <di...@gmail.com> wrote:

> Just Rename the folder.
>
>
> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <di...@gmail.com> wrote:

> Just Rename the folder.
>
>
> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>
>

Re: Delete a folder name containing *

Posted by praveenesh kumar <pr...@gmail.com>.
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 <di...@gmail.com> wrote:

> Just Rename the folder.
>
>
> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
>> hadoop fs -rmr /data/folder* it will delete everything which I want to
>> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
>> Any hints/tricks ?
>>
>>
>> Regards
>> Praveenesh
>>
>
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
Just Rename the folder.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by hadoop hive <ha...@gmail.com>.
Move it to some tmp directory and delete parent directory.
On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
Just Rename the folder.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
Just Rename the folder.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

RE: Delete a folder name containing *

Posted by "Liu, Yi A" <yi...@intel.com>.
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.uid@gmail.com]
Sent: Thursday, August 21, 2014 2:21 PM
To: user; praveenesh@gmail.com
Subject: Re: Delete a folder name containing *

Make sure namenode is not in safe mode.

On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do hadoop fs -rmr /data/folder* it will delete everything which I want to avoid. I tried with escape character \ but HDFS FS shell is not taking it. Any hints/tricks ?


Regards
Praveenesh



--
Regards,
Varun Kumar.P

RE: Delete a folder name containing *

Posted by "Liu, Yi A" <yi...@intel.com>.
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.uid@gmail.com]
Sent: Thursday, August 21, 2014 2:21 PM
To: user; praveenesh@gmail.com
Subject: Re: Delete a folder name containing *

Make sure namenode is not in safe mode.

On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do hadoop fs -rmr /data/folder* it will delete everything which I want to avoid. I tried with escape character \ but HDFS FS shell is not taking it. Any hints/tricks ?


Regards
Praveenesh



--
Regards,
Varun Kumar.P

RE: Delete a folder name containing *

Posted by "Liu, Yi A" <yi...@intel.com>.
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.uid@gmail.com]
Sent: Thursday, August 21, 2014 2:21 PM
To: user; praveenesh@gmail.com
Subject: Re: Delete a folder name containing *

Make sure namenode is not in safe mode.

On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do hadoop fs -rmr /data/folder* it will delete everything which I want to avoid. I tried with escape character \ but HDFS FS shell is not taking it. Any hints/tricks ?


Regards
Praveenesh



--
Regards,
Varun Kumar.P

RE: Delete a folder name containing *

Posted by "Liu, Yi A" <yi...@intel.com>.
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.uid@gmail.com]
Sent: Thursday, August 21, 2014 2:21 PM
To: user; praveenesh@gmail.com
Subject: Re: Delete a folder name containing *

Make sure namenode is not in safe mode.

On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do hadoop fs -rmr /data/folder* it will delete everything which I want to avoid. I tried with escape character \ but HDFS FS shell is not taking it. Any hints/tricks ?


Regards
Praveenesh



--
Regards,
Varun Kumar.P

Re: Delete a folder name containing *

Posted by varun kumar <va...@gmail.com>.
Make sure namenode is not in safe mode.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>



-- 
Regards,
Varun Kumar.P

Re: Delete a folder name containing *

Posted by varun kumar <va...@gmail.com>.
Make sure namenode is not in safe mode.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>



-- 
Regards,
Varun Kumar.P

Re: Delete a folder name containing *

Posted by dileep kumar <di...@gmail.com>.
Just Rename the folder.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by varun kumar <va...@gmail.com>.
Make sure namenode is not in safe mode.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>



-- 
Regards,
Varun Kumar.P

Re: Delete a folder name containing *

Posted by hadoop hive <ha...@gmail.com>.
Move it to some tmp directory and delete parent directory.
On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by hadoop hive <ha...@gmail.com>.
Move it to some tmp directory and delete parent directory.
On Aug 20, 2014 4:23 PM, "praveenesh kumar" <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>

Re: Delete a folder name containing *

Posted by varun kumar <va...@gmail.com>.
Make sure namenode is not in safe mode.


On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <pr...@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 to delete /data/folder* without deleting its sub_folders. If I do
> hadoop fs -rmr /data/folder* it will delete everything which I want to
> avoid. I tried with escape character \ but HDFS FS shell is not taking it.
> Any hints/tricks ?
>
>
> Regards
> Praveenesh
>



-- 
Regards,
Varun Kumar.P