We can copy files from the local file system and vice versa. We can append data into existing files in HDFS.
- hadoop fs -copyFromLocal or hadoop fs -put – to copy files from local filesystem and HDFS.
-f: Overwrite the destination if it already exists.
-p: Preserves access and modification times of the file.
-l: Allow DataNode replication factor to be specified in copy.
-d: Require datanode and tasktracker encryption.
-t: Copy to specified storage policy.
This information can help you use the hdfs dfs -copyFromLocal command more effectively, by allowing you to understand the different options available and how to use them.
Here is the command hadoop fs -copyFROMLocal -f how we use them