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 < [email protected]> wrote: > try putting the name in quotes > > > On Wed, Aug 20, 2014 at 4:35 PM, praveenesh kumar <[email protected]> > 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 <[email protected]> >> wrote: >> >>> Just Rename the folder. >>> >>> >>> On Wed, Aug 20, 2014 at 6:53 AM, praveenesh kumar <[email protected]> >>> 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 >>>> >>> >>> >> >
