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
15 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,110 points
146 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,110 points

edited May 9, 2018 by nitinrawat895 1,966 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
41 views
0 votes
1 answer

What does hadoop fs -du command gives as output?

The first value is the size of ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,190 points
642 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,190 points
63 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,190 points
120 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,190 points
163 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
6,046 views