0% found this document useful (0 votes)
438 views6 pages

4.hadoop Commands

The document lists and describes various Hadoop commands. Some key commands include: - hadoop version: Displays the Hadoop version - hadoop fs: Provides file system commands for interacting with files on HDFS - jps: Lists Java virtual machines running on the system - hadoop fs commands like -ls, -mkdir, -rmdir for working with directories on HDFS - hadoop fs commands like -put, -get, -copyFromLocal, -copyToLocal for copying files between local file system and HDFS

Uploaded by

Gaurav Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
438 views6 pages

4.hadoop Commands

The document lists and describes various Hadoop commands. Some key commands include: - hadoop version: Displays the Hadoop version - hadoop fs: Provides file system commands for interacting with files on HDFS - jps: Lists Java virtual machines running on the system - hadoop fs commands like -ls, -mkdir, -rmdir for working with directories on HDFS - hadoop fs commands like -put, -get, -copyFromLocal, -copyToLocal for copying files between local file system and HDFS

Uploaded by

Gaurav Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

HADOOP COMMANDS

1. hadoop version : It gives the Hadoop version.

2. hadoop fs : gives all the hadoop file system commands.

3. jps : Java process state It gives the Java Virtual Machine Process Tool Status. The jps tool
lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system.
4. ifconfig : It is used to check ip address and the ip link.

5. hadoop fs ls / :

6. hadoop fs mkdir /: This is used to make a new directory in the hadoop file system.
7. hadoop fs rmdir /: This command is used to remove directory(or ies) from the hadoop file
system.

8. cat > filename : This will create a file with the name specified and input the text that is entered
by the user followed by the command.

9. hadoop fs cat /: It is used to output the contents of the existing file used in the command.

10. hadoop fs put /local_src /dest (or copyFromLocal) : This command will copy the file from
the local system to the hadoop file system.
11. hadoop fs -rm /: Remove This command is used to remove the existing files from the hadoop
file system.

12. hadoop fs setrep /: This command is used to set the replicas of the files and folders in the
hdfs.

13. hadoop fs du /: This command shows the total disk usage of the given file or folder or if
nothing is specified then gives the total disk usage of the hdfs.
When appended by h, then the diska usage is shown in the form of human readable format
or else it is shown in the form of bytes.
14. hadoop fs get /src /local_dest (or copyToLocal) : This command will copy the file from the
local system to the hadoop file system.

15. hadoop fs tail / : This is used to read the last ten lines of a file stored in the hdfs.

16. hadoop fs mv /src /dest : This command is used to move a file or folder from one locaton of
the hdfs to another location of the hdfs locally.

17. hadoop fs cp /src /dest : This is used to copy a file or folder from one location in the hdfs to
another.
18. hadoop fs df / : This command is used for giving the free disk space on the hadoop file
system.

You might also like