Not able to upload files to hdfs No such file or directory

0 votes

Hi. I am trying to upload a file from local file system to hdfs. I am using the below command for this:

hadoop fs -put sample1

But I am getting the below error:

put: 'sample1': No such file or directory

But this file exists here. Output of ls command:

$ ls
Docs    Finance    readme.txt     sample1.txt
Jul 11, 2019 in Big Data Hadoop by Punit
3,788 views

1 answer to this question.

0 votes

The reason for this error is that you are missing the file extension. The file name is samepl1.txt but you are using sample1. Try the below command, it should work:

hdfs fs -put sample1.txt
answered Jul 11, 2019 by Srujan

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Not able to find HDFS directory on my system?

I guess you didn't understand it correctly dfs.datanode.data.dir, ...READ MORE

answered Apr 17, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
7,361 views
0 votes
1 answer

“no such file or directory" in case of hadoop fs -ls

The behaviour that you are seeing is ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points

edited May 9, 2018 by nitinrawat895 7,989 views
0 votes
1 answer

Hadoop Pipe: shared libraries, No such file or directory error

Add -rpath my.zip/lib to LDFLAGS_HDP. For compilation to work, you ...READ MORE

answered Aug 30, 2018 in Big Data Hadoop by Frankie
• 9,830 points
920 views
+1 vote
2 answers

What does hadoop fs -du command gives as output?

du command is used for to see ...READ MORE

answered Jul 24, 2019 in Big Data Hadoop by Lokesh Singh
5,686 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...