Hadoop Commands Example

  1. cat => hadoop fs -cat /hdfs_home/input/abc.txt
  2. chmod => hadoop fs -chmod 777 /hdfs_home/input/abc.txt
  3. chown => hadoop fs -chown hduser:hadoop /hdfs_home/input/abc.txt
  4. copyFromLocal => hadoop fs -copyFromLocal /home/anoop/abc.txt /hdfs_home/input/
  5. copyToLocal => hadoop fs -copyToLocal /hdfs_home/input/abc.txt /home/anoop/
  6. cp => hadoop fs -cp /hdfs_home/input/abc.txt /hdfs_home/output/
  7. du => hadoop fs -du /hdfs_home/input/
  8. get => hadoop fs – get /hdfs_home/input/abc.txt /home/anoop/
  9. ls => hadoop fs -ls /hdfs_home/input/
  10. lsr => hadoop fs -lsr /hdfs_home/
  11. mkdir => hadoop fs -mkdir /hdfs_home/input/sampledir
  12. moveFromLocal => hadoop fs -moveFromLocal /home/anoop/abc.txt /hdfs_home/input/
  13. moveToLocal => hadoop fs -moveToLocal /hdfs_home/input/abc.txt /home/anoop/
  14. mv => hadoop fs -mv /hdfs_home/input/abc.txt /hdfs_home/output/
  15. put => hadoop fs -put /home/anoop/abc.txt /hdfs_home/input
  16. rm => hadoop fs -rm /hdfs_home/input/abc.txt
  17. rmdir => hadoop fs -rmdir /hdfs_home/input/
  18. rmr => hadoop fs -rmr /hdfs_home/input/
  19. tail => hadoop fs -tail /hdfs_home/input/abc.txt
  20. text => hadoop fs -text /hdfs_home/input/abc.txt
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s