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 in Big Data Hadoop by Punit
76 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 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,730 points
335 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,730 points

edited May 9, 2018 by nitinrawat895 2,650 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
76 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 in Big Data Hadoop by Lokesh Singh
1,111 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,310 points
97 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,310 points
240 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,310 points
276 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 in Big Data Hadoop by Sowmya
9,863 views