Database Reference
In-Depth Information
Commonly used HDFS commands
The following are some of the most commonly used HDFS commands:
•
ls
: This command lists files in HDFS.
The syntax of the
ls
command is
hdfs dfs -ls <args>
. The following is
the screenshot showing an example of the
ls
command:
•
cat
: This command displays the contents of file/files in the terminal.
The syntax of the
cat
command is
hdfs dfs -cat URI [URI …]
. The fol-
lowing is a sample output of the
cat
command: