Rename directory in hdfs

前端 未结 3 1864
自闭症患者
自闭症患者 2021-02-19 04:20

I need to rename a directory in hdfs. What is the command for that ?

hadoop fs -mv   

The above command moves the src f

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 05:11

    You can rename the folder in HDFS environment by using mv command

    hadoop fs -mv 'Old folder name with path' ' new folder name with path'
    

    Example: I have folder in HDFS at location /test/abc and I want to rename it to PQR

    hadoop fs -mv '/test/abc' '/test/PQR';
    

    Results:

提交回复
热议问题