Hadoop Commands
Hadoop Commands
Hadoop
Basic Commands In Hadoop
• We need to know some basic commands in hadoop in order to access the HDFS .
• We can create directories , transfer the f ile from local to HDFS , can see the data in the f iles
in HDFS using the basic commands in hadoop.
• Without knowing the basic commands , we cannot process the data in HDFS.
Basic Commands In Hadoop
• Version : This command will check the hadoop version
Basic Commands In Hadoop
• Jps is used to check whether all the hadoop services are running or not.
Basic Commands In Hadoop
• ls: This command is used to list all the files.
Basic Commands In Hadoop
• mkdir: In order to create the new directory in HDFS , below command is used
Basic Commands In Hadoop
• Put : This command is used to put the data from local to HDFS
• We have a file txns in local , and we are putting into HDFS .
Basic Commands In Hadoop
• cat: This command is used to view the data in HDFS
Basic Commands In Hadoop
• touchz: This command will create the empty file in HDFS
Basic Commands In Hadoop
• get: This command will get the file from HDFS to Local (edge Node or Linux terminal)
• We have a file txns in hdfs under the directory as shown , we will get that to local
Basic Commands In Hadoop
• cp: This command is used to copy the files with in HDFS directories
Basic Commands In Hadoop
• mv: This command is used to move the f iles from one directory to other in HDFS ,its like cut
and paste from one location in other.
Basic Commands In Hadoop
• rm -r: This command will delete a file from HDFS .
Basic Commands In Hadoop
• du: This command will give the size of each file in directory
Basic Commands In Hadoop
• du -s: This command will give the total size of directory
Basic Commands In Hadoop
• stat: This command will give the last modified time of directory or path.
Basic Commands In Hadoop
• report: This command will give the capacity of cluster
Thank you