Is there any difference between “hdfs dfs” and “hadoop fs” shell commands?

+2 votes

Are both means the same? but, why the "hdfs dfs" commands show the local files while the "hadoop fs" commands show the hdfs files?

Mar 15, 2018 in Big Data Hadoop by nitinrawat895
• 10,690 points
10,468 views

10 answers to this question.

0 votes

hadoop fs <args>

fs is used for generic file system and it can point to any file system such as local file system, HDFS, WebHDFS, S3 FS, etc.

hadoop dfs <args>

hdfs dfs <args>

dfs points to the Distributed File System and it is specific to HDFS. You can use it to execute operations on HDFS. Now it is deprecated, and you have to use hdfs dfs instead of hadoop dfs.

answered Mar 16, 2018 by anonymous
0 votes
fs refers to any file system, it could be local or HDFS but dfs refers to only HDFS file system.

So if you need to perform access/transfer data between different filesystem, fs is the way to go
answered Aug 22, 2018 by kurt_cobain
• 9,260 points
0 votes
Both of them are same. They are just different syntax of commands for different versions.
answered Oct 23, 2018 by Sharon

They are similar but they are not the same. fs is file system and it could be the normal file system. dfs is distributed file system

Oh. I did not know that. Thanks
0 votes
hdfs points to only hadoop file system whereas hadoop fs points to either local or hadoop file system
answered Dec 7, 2018 by Ash
0 votes
dfs means ditributed file system and fs means file system. Here, fs include local file system and hdfs
answered Dec 7, 2018 by Brock
0 votes

Here's a definition for both these command:

elif [ "$COMMAND" = "fs" ] ; then
  CLASS=org.apache.hadoop.fs.FsShell
  HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "dfs" ] ; then
  CLASS=org.apache.hadoop.fs.FsShell
answered Dec 7, 2018 by Misty
0 votes

You can find the definition of these commands and hence the difference in the hadoop file. Path:

$HADOOP_HOME/bin/hadoop
answered Dec 7, 2018 by Wadha
0 votes
hdfs dfs can be considered a subset of hadoop fs because hadoop fs includes hdfs along with different sile system
answered Dec 7, 2018 by Tara
0 votes
Hadoop fs contains different file systems like hdfs, local file system, web hdfs etc. And dfs is only distributed file system.
answered Dec 7, 2018 by Bint
0 votes

Yes, there's a difference between hadoop fs and hdfs dfs. hadoop fs is used to communicate with any file system. hdfs dfs is used to communicate particularly with hadoop distributed file system.

answered Dec 7, 2018 by Kunal

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop: What is the difference between `hadoop dfs` and `hadoop fs`?

You can find the definition here: $HADOOP_HOME/bin/hadoop ... elif [ ...READ MORE

answered Nov 6, 2018 in Big Data Hadoop by Omkar
• 67,620 points
294 views
0 votes
1 answer

Is there any Relationship between Hadoop and Databases?

As such, there is no relationship between ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
52 views
+1 vote
1 answer

What is difference between Hadoop Namenode HA and HDFS federation?

The main difference between HDFS High Availability ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Frankie
• 9,810 points
238 views
0 votes
10 answers

What is the difference between Mongodb and Hadoop?

Apart from the similarity that they are ...READ MORE

answered Dec 6, 2018 in Big Data Hadoop by Deeraj
2,532 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,690 points
3,019 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
14,898 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,104 views
0 votes
1 answer
0 votes
1 answer

How to install and configure a multi-node Hadoop cluster?

I would recommend you to install Cent ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by Shubham
• 13,300 points
661 views
0 votes
3 answers

What are differences between NameNode and Secondary NameNode?

File metadata information is stored by Namenode ...READ MORE

answered Apr 7 in Big Data Hadoop by anonymous
1,957 views