Hadoop fs -ls /user/cloudera - command not working


#1

I am using cloudera VM and as per your instruction, I used the command “hadoop fs -ls /user/cloudera”. But nothing happens on the screen. what should i do?


#2

@skshady First use put command then try hadoop fs -ls command


#3

that means we have to create directory using put command but how? and what should be the content in the file.


#4

@skshady Create a file with any content and use put to copy file.

Example:
touch file.txt
hadoop fs -put file.txt /user/cloudera/

hadoop fs -ls /user/cloudera


#5

what about the hdfs file?
how am i gonna put those files like he did?
apparently when i make any file as you said.
Thank you


#6

@skshady

A directory(.Trash) is already there in the video ur watching. Hence, there is no file or directory in your hdfs location we need to create one and copy that into hdfs location.

Try below commands:
[cloudera@quickstart ~]$ touch skshadyfile
[cloudera@quickstart ~]$ hadoop fs -put skshadyfile /user/cloudera
[cloudera@quickstart ~]$ hadoop fs -ls /user/cloudera


#7

have you any idea of csv and jason files in cloudera and how to add them into hdfs?
Thanks for the help.