I have googled and found that there is no difference between hdfs dfs and hadoop fs. They’re simply different naming conventions based on which version of Hadoop you’re using.
FS relates to a generic file system which can point to any file systems like local, HDFS etc. But dfs is very specific to HDFS file system. So if you need to perform access/transfer data between different filesystem, fs is the way to go.
You can refer to the local FS by using the file schema at the URIs passed as argument to hadoop fscommands (e.g. hdoop fs -ls file:///). If nothing is said, it defaults to hdfs schema, AFAIK (hdoop fs -ls / == hadoop fs -ls hdfs:///)
We can also see similarity of these two commands hadoop fs and hadoop dfs in $HADOOP_HOME/bin/hadoop
elif [ "$COMMAND" = "datanode" ] ;
then
CLASS='org.apache.hadoop.hdfs.server.datanode.DataNode'
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_DATANODE_OPTS"
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
HADOOP_OPTS="$HADOOP_OPTS
$HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "dfsadmin" ] ;
then
CLASS=org.apache.hadoop.hdfs.tools.DFSAdmin
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
Below are the excerpts from hadoop documentation which describes these two as different shells.
FS Shell The FileSystem (FS) shell is invoked by bin/hadoop fs . All the FS shell commands take path URIs as arguments. The URI format is scheme://autority/path. For HDFS the scheme is hdfs, and for the local filesystem the scheme is file. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. An HDFS file or directory such as /parent/child can be specified as hdfs://namenodehost/parent/child or simply as /parent/child (given that your configuration is set to point to hdfs://namenodehost). Most of the commands in FS shell behave like corresponding Unix commands.
DFShell The HDFS shell is invoked by bin/hadoop dfs . All the HDFS shell commands take path URIs as arguments. The URI format is scheme://autority/path. For HDFS the scheme is hdfs, and for the local filesystem the scheme is file. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. An HDFS file or directory such as /parent/child can be specified as hdfs://namenode:namenodeport/parent/child or simply as /parent/child (given that your configuration is set to point to namenode:namenodeport). Most of the commands in HDFS shell behave like corresponding Unix commands.