Reputation: 93
I am trying to put a file in a HDFS directory with the directory name containing space. The following issue occurs:
Suppose hdfs directory “sub dir1” already exists. Now I tried to put a file, sub.txt in this directory using following command:
hadoop fs -put sub.txt /user/jdutt/TempTesting/output//sub\ dir1/
It doesn’t put file in “sub dir1” directory; instead it creates another directory with the name “sub%20dir1” and puts file there. How to solve this issue?
Upvotes: 4
Views: 4794
Reputation: 73
hadoop fs -copyFromLocal /home/cloudera/Documents/Hadoop/Hive%20Data/empdata hive_data
it's working for me
Upvotes: 0
Reputation: 2695
Please try to run command as
hadoop fs -put sub.txt /user/jdutt/TempTesting/output/'sub dir1'/
i have tested it on hadoop viersion 1.0.4 and it is working.
Upvotes: 1