hadoop fs -copyFromLocal <Local system directory path> <HDFS file path>
A choice exists to overwrite an existing file using -f when using copyFromLocal. However, an error is returned if the file persists when "put" is executed.
In short, anything you do with copyFromLocal, you can do with "put", but not vice-versa.
CopyToLocal and Get:
These two commands are just opposite to "CopyFromLocal" and "Put".
The destination is restricted to a local file reference when we use copyToLocal. While using "Get" there are no such restrictions.
Anything you do with copyToLocal, you can do with "get" but not vice-versa.
hadoop fs -get <HDFS file path> <Local system directory path>
hadoop fs -copyToLocal <HDFS file path> <Local system directory path>
For complete HDFS commands please click here. For complete Hive DDL commands please click here.