In my previous blog, we have configured hadoop single and cluster set up. Now try to create the files and directories on Hadoop distributed file system(HDFS).  You can see the full list here.

When I started the hdfs commands I got confused with three different command syntax. All three commands appears to be same but have some differences as explained below.

  • hadoop fs {args}

FS relates to a generic file system which can point to any file systems like local, HDFS etc. So this can be used when you are dealing with different file systems such as Local FS, (S)FTP, S3, and others.

  • hadoop dfs {args}

dfs is very specific to HDFS. would work for operation relates to HDFS. This has been deprecated and we should use hdfs dfs instead.

  • hdfs dfs {args}

same as 2nd i.e would work for all the operations related to HDFS and is the recommended command instead of hadoop dfs

Create OS user and test the various commands.

hadoop fs:

hdfs dfs:

hadoop dfs:

Copy file HDFS to Local file system:


Leave a Reply