Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Important HDFS Command

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 22 Nov, 2021
  • 0 Comments
  • 1 Min Read

Important HDFS Command

HDFS is the primary or major component of the Hadoop ecosystem which is responsible for storing large data sets of structured or unstructured data across various nodes and thereby maintaining the metadata in the form of log files. To use the HDFS commands, first you need to start the Hadoop services using the following command: Hadoop works on its own File System which is distributed in nature known as “Hadoop distributed File System HDFS”. Hadoop relies on distributed storage and parallel processing.

1. version
1
hadoop version
2. mkdir
1
hdfs dfs –mkdir /path/directory_name
3. ls
1
hdfs dfs -ls /path
4. put
1
hdfs dfs -put <localsrc> <dest>
5. copyFromLocal
1
hdfs dfs -copyFromLocal <localsrc> <hdfs destination>
6. get
1
hdfs dfs -get <src> <localdest>
7. copyToLocal
1
hdfs dfs -copyToLocal <hdfs source> <localdst>
8. cat
1
hdfs dfs –cat /path_to_file_in_hdfs
9. mv
1
hdfs dfs -mv <src> <dest>
10. cp
1
hdfs dfs -cp <src> <dest>
11. du
1
hdfs dfs –du –s /directory/filename
12. text
1
hdfs dfs –text /directory/filename
13. count
1
hdfs dfs -count <path>
14. setrep
1
hdfs dfs -setrep -R  4 /geeks
15. start-all.sh 16. jps 17. chmod
1
hdfs dfs -chmod [-R] <mode> <path>
18. getmerge
1
hdfs dfs -getmerge <src> <localdest>