The “fs” term refers to a generic file system, which by the definition can point to ANY file system ( including HDFS), but dfs is very specific. On the other hand, “DFS” refers precisely to Hadoop Distributed File System access. So when we use FS it can perform operation related to local or hadoop distributed file system and dfs can perform operation related to hadoop distributed file system only.
So,
hadoop fs
It is used when we are dealing with different file systems such as Local FS, HDFS etc.
hdfs dfs
It is used when we are dealing for operations related to HDFS.
Another command, which looks similiar to these two is
3. hadoop dfs
This command should not be used, as it is deprecated. Even if you use it, it will send the command to hdfs dfs.