HDFS Commands
HDFS Commands
fsck --HDFS Command to check the health of the Hadoop file system.
hdfs fsck /
ls --
hdfs dfs -ls /
mkdir
hdfs dfs -mkdir /Raghav
touchz
hdfs dfs -touchz /Raghav/Sample
cat --HDFS Command that reads a file on HDFS and prints the
content of that file to the standard output.
text --HDFS Command that takes a source file and outputs the file in
text format.
copyFromLocal --HDFS Command to copy the file from a Local file system to HDFS.
Usage: hdfs dfs -copyFromLocal <localsrc> <hdfs
destination>
Command: hdfs dfs –copyFromLocal
/home/edureka/test /new_edureka
copyToLocal --HDFS Command to copy the file from HDFS to Local File System.
Usage: hdfs dfs -copyToLocal <hdfs source> <localdst>
Command: hdfs dfs –copyToLocal /new_edureka/test
/home/edureka
get --HDFS Command to copy files from hdfs to the local file
system.
Usage: hdfs dfs -get <src> <localdst>
Command: hdfs dfs –get /user/test /home/edureka
usage --HDFS Command that returns the help for an individual command.
help --HDFS Command that displays help for given command or all
commands if none is specified.
Command: hdfs dfs -help