
Introducing Hadoop | 61
3.5 HDFS TECHNICAL COMMANDS
Let us now look at a few frequently used HDFS commands.
Use Case Hadoop Commands
The purpose of this command is to look at the entire HDFS
le system. You have to mention ‘hadoop fs’ always as
a prex for HDFS commands, and thereafter put a dash sign
(‘-‘), followed by the desired command, for example, ‘ls’ for
le listing.
hadoop fs -ls /
The purpose of this command is to create a directory named
‘bigdata’ inside the HDFS le system. Now assume that a
le named ‘employee.txt’ inside Linux local le system,
for example, under /usr/local. If you want to replicate
this le in HDFS, then use this ...