HDFS offers a command-line utility where we can execute HDFS shell commands. These commands are very much similar to Linux-based commands.
HDFS command reference
File System commands
File System commands can be used to directly interact with HDFS. These commands can also be executed on an HDFS supported File System such as WebHDFS, S3, and so on. Let's walk through a few basic, important commands:
- -ls: The ls command lists all the directories and files within a specified path:
hadoop fs -ls /user/packt/
The ls command returns the following information:
File_Permission numberOfReplicas userid groupid filesize last_modification_date last_modification_time filename/directory_name
A few options are also...