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
277 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
• 10,950 points
1,830 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
• 10,950 points

edited May 9, 2018 by nitinrawat895 4,731 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,810 points
262 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 23, 2019 in Big Data Hadoop by Lokesh Singh
2,608 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,450 points
253 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,450 points
645 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,450 points
712 views
0 votes
1 answer
0 votes
11 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
24,405 views