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
4,205 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,705 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 8,263 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
1,055 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,897 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,332 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,228 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,498 views
0 votes
1 answer

HDFS: Upload file from local file system to Edureka cloud lab

To upload a file from your local ...READ MORE

answered Jul 11, 2019 in Big Data Hadoop by Zora
1,426 views
+1 vote
12 answers

How to check size of HDFS directory?

It is the same syntax. Use the ...READ MORE

answered Jun 6, 2019 in Big Data Hadoop by Sowmya
48,370 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP