HDFS IMPORTANT COMMANDS
1. Start Hadoop service by using the command
sbin/start-dfs.sh
2. Hadoop HDFS mkdir Command Usage:
hadoop fs –mkdir /path/directory_name
3. Hadoop HDFS ls Command Usage:
hadoop fs -ls /path
4. Hadoop HDFS put Command Usage:
haoop fs -put <localsrc> <dest>
5. Hadoop HDFS copyFromLocal Command Usage:
hadoop fs -copyFromLocal <localsrc> <hdfs destination>
6. Hadoop HDFS get Command Usage:
hadoop fs -get <src> <localdest>
7. Hadoop HDFS copyToLocal Command Usage:
hadoop fs -copyToLocal <hdfs source> <localdst>
8. Hadoop HDFS cat Command Usage:
hadoop fs –cat /path_to_file_in_hdfs
9. Hadoop HDFS mv Command Usage:
hadoop fs -mv <src> <dest>
10. Hadoop HDFS cp Command Usage:
hadoop fs -cp <src> <dest>
11. HDFS moveFromLocal Command Usage:
hadoop fs -moveFromLocal <localsrc> <dest>
12. HDFS moveToLocal Command Usage:
hadoop fs -moveToLocal <src> <localdest>
13. HDFS tail Command Usage:
hadoop fs -tail [-f] <file>
14. HDFS rm Command Usage:
hadoop fs –rm <path>
15. HDFS chown Command Usage:
hadoop fs -chown [-R] [owner] [:[group]] <path>
16. HDFS chgrp Command Usage:
hadoop fs -chgrp <group> <path>
17. HDFS du Command Usage:
hadoop fs –du –s /directory/filename
18. HDFS df Command Usage:df shows the capacity, size, and free space available on the HDFS file system.
hadoop fs -df [-h] <path>
19.HDFS fsck Command Usage:
hadoop fsck <path> [ -move | -delete | -openforwrite] [-files [-blocks [-locations | -racks]]]
we are trying to check the health of the files in ‘dataflair’ directory present in HDFS using the fsck command
20. Hadoop count Command Usage:
hadoop fs -count [options] <path>
No comments:
Post a Comment