Hadoop fs -put Command Explained

The “hadoop fs -put” command is a command line tool for the Hadoop File System (HDFS) used to upload local files or directories to HDFS. Here is a detailed explanation of this command:

  1. hadoop: a command-line tool used to perform Hadoop-related operations.
  2. fs: This subcommand represents operations on the file system.
  3. The “put” command is used to upload (copy) local files or directories to HDFS.

When using the hadoop fs -put command, you must specify the path of the local file or directory, as well as the destination path in HDFS where you want to upload it. For example, to upload the local file localfile.txt to the /user/username/ directory in HDFS, you can execute the following command:

hadoop fs -put localfile.txt /user/username/

This will copy the local file localfile.txt to the directory /user/username/ in HDFS.

bannerAds