Q:

HDFS 'No such file or directory' error when trying to copy csv from one directory to another

I am using Hortonworks Sandbox (not sure if this matters) and was trying to copy a csv file from '/user/root/' directory into '/user/nyc_taxi/' directory but it gave me a 'No such file or directory' error. I am very sure the csv, called 'yellow_tripdata_2016_01.csv', is in the '/user/root/' directory.
I use Windows 10 and below are the commands I wrote in terminal:
>sudo su - hdfs
>hdfs dfs -mkdir /user/root
>hdfs dfs -mkdir /user/nyc_taxi
>hdfs dfs -chown root:hdfs /user/root
>hdfs dfs -chown root:hdfs /user/nyc_taxi
>exit
>hadoop fs -put yellow_tripdata_2016_01.csv /user/nyc_taxi/

The first 6 commands had no problem. But when I ran the last one the terminal returned the 'No such file or directory' error. I had also tried specifying the actual path of the csv by running this command: 
hadoop fs -put /user/root/yellow_tripdata_2016_01.csv /user/nyc_taxi/ 

But the same error message still showed up. 
As can be seen from the screenshot below, the csv file is clearly in the '/user/root/' directory.

Any feedback/recommendation is greatly appreciated!

A:

-put command looks for yellow_tripdata_2016_01.csv file in local file system not on hdfs.
But your file is in HDFS that's the reason why you are getting that error.
Refer to this link for more details regards to Hadoop -put/-cp/-mv commands.
If you want to copy/move the HDFS file into another HDFS directory use below commands
Copy the file into another hdfs directory:
hadoop fs -cp /user/root/yellow_tripdata_2016_01.csv /user/nyc_taxi/

Move the file into another directory:
hadoop fs -mv /user/root/yellow_tripdata_2016_01.csv /user/nyc_taxi/

