1. Create a directory in HDFS at given path(s).
Usage:
hadoop fs -mkdir <paths>
Example:
hadoop fs -mkdir /user/saurzcode/dir1 /user/saurzcode/dir2
2. List the contents of a directory.
Usage :
hadoop fs -ls <args>
Example:
hadoop fs -ls /user/saurzcode
3. Upload and download a file in HDFS.
Upload:
hadoop fs -put:
Copy single src file, or multiple src files from local file system to the Hadoop data
file system
Usage:
hadoop fs -put <localsrc> ... <HDFS_dest_Path>
Example:
hadoop fs -put /home/saurzcode/Samplefile.txt /user/saurzcode/dir3/
hadoop fs -get:
Copies/Downloads files to the local file system
Usage:
hadoop fs -get <hdfs_src> <localdst>
Example:
hadoop fs -get /user/saurzcode/dir3/Samplefile.txt /home/
4. See contents of a file
Same as unix cat command:
Usage:
hadoop fs -cat <path[filename]>
Example:
hadoop fs -cat /user/saurzcode/dir1/abc.txt
5. Copy a file from source to destination
This command allows multiple sources as well in which case the destination must
be a directory.
Usage:
hadoop fs -cp <source> <dest>
Example:
hadoop fs -cp /user/saurzcode/dir1/abc.txt /user/saurzcode/dir2
6. Copy a file from/To Local file system to HDFS
copyFromLocal
Usage:
hadoop fs -copyFromLocal <localsrc> URI
Example:
hadoop fs -copyFromLocal /home/saurzcode/abc.txt /user/saurzcode/abc.txt
Similar to put command, except that the source is restricted to a local file reference.
copyToLocal
Usage:
hadoop fs -copyToLocal [-ignorecrc] [-crc] URI <localdst>
Similar to get command, except that the destination is restricted to a local file reference.
7. Move file from source to destination.
Note:- Moving files across filesystem is not permitted.
Usage :
hadoop fs -mv <src> <dest>
Example:
hadoop fs -mv /user/saurzcode/dir1/abc.txt /user/saurzcode/dir2
8. Remove a file or directory in HDFS.
Remove files specified as argument. Deletes directory only when it is empty
Usage :
hadoop fs -rm <arg>
Example:
hadoop fs -rm /user/saurzcode/dir1/abc.txt
Usage :
hadoop fs -rmr <arg>
Example:
hadoop fs -rmr /user/saurzcode/
9. Display last few lines of a file.
Similar to tail command in Unix.
Usage :
hadoop fs -tail <path[filename]>
Example:
hadoop fs -tail /user/saurzcode/dir1/abc.txt
10. Display the aggregate length of a file.
Usage :
hadoop fs -du <path>
Example:
hadoop fs -du /user/saurzcode/dir1/abc.txt
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology
394753714-hdfc-command-biga data tecnology

More Related Content

PDF
Hadoop File System Shell Commands,
PDF
an detailed notes on Hadoop_Shell_Commands.pdf
PDF
Hadoop-HDFS-commands.pdf hadoop commands
PPTX
5c_BigData_Hadoop_HDFS.PPTX
PDF
HDFS_Command_Reference
PPTX
Top 10 Hadoop Shell Commands
PDF
Interacting with hdfs
PPTX
Basic command of hadoop
Hadoop File System Shell Commands,
an detailed notes on Hadoop_Shell_Commands.pdf
Hadoop-HDFS-commands.pdf hadoop commands
5c_BigData_Hadoop_HDFS.PPTX
HDFS_Command_Reference
Top 10 Hadoop Shell Commands
Interacting with hdfs
Basic command of hadoop

Similar to 394753714-hdfc-command-biga data tecnology (20)

PPTX
Hadoop & HDFS for Beginners
PPTX
Hadoop Interacting with HDFS
PDF
General apache command for hadoop
PDF
BIGDATA ANALYTICS LAB MANUAL final.pdf
PPTX
Hadoop
PPTX
Hadoop Installation presentation
PPTX
Introduction to HDFS and MapReduce
PDF
RHive tutorial - HDFS functions
PPTX
Hadoop 20111117
PDF
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...
PDF
Apache HDFS - Lab Assignment
PPTX
Hadoop 20111215
PDF
Hadoop operations basic
ODP
HDFS presented by VIJAY
PPTX
Hadoop HDFS
PDF
第2回 Hadoop 輪読会
PDF
Hdfs java api
PDF
Big data using Hadoop, Hive, Sqoop with Installation
PDF
Apache Hadoop Shell Rewrite
PPTX
Hadoop HDFS Concepts
Hadoop & HDFS for Beginners
Hadoop Interacting with HDFS
General apache command for hadoop
BIGDATA ANALYTICS LAB MANUAL final.pdf
Hadoop
Hadoop Installation presentation
Introduction to HDFS and MapReduce
RHive tutorial - HDFS functions
Hadoop 20111117
IOD 2013 - Crunch Big Data in the Cloud with IBM BigInsights and Hadoop lab s...
Apache HDFS - Lab Assignment
Hadoop 20111215
Hadoop operations basic
HDFS presented by VIJAY
Hadoop HDFS
第2回 Hadoop 輪読会
Hdfs java api
Big data using Hadoop, Hive, Sqoop with Installation
Apache Hadoop Shell Rewrite
Hadoop HDFS Concepts
Ad

Recently uploaded (20)

PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Unit1 - AIML Chapter 1 concept and ethics
PDF
First part_B-Image Processing - 1 of 2).pdf
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPTX
Building constraction Conveyance of water.pptx
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
PPTX
Feature types and data preprocessing steps
PPTX
Measurement Uncertainty and Measurement System analysis
PDF
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
PDF
Applications of Equal_Area_Criterion.pdf
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
Module 8- Technological and Communication Skills.pptx
PPTX
Petroleum Refining & Petrochemicals.pptx
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PPTX
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Unit1 - AIML Chapter 1 concept and ethics
First part_B-Image Processing - 1 of 2).pdf
distributed database system" (DDBS) is often used to refer to both the distri...
Exploratory_Data_Analysis_Fundamentals.pdf
Building constraction Conveyance of water.pptx
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
Feature types and data preprocessing steps
Measurement Uncertainty and Measurement System analysis
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
Applications of Equal_Area_Criterion.pdf
August -2025_Top10 Read_Articles_ijait.pdf
Module 8- Technological and Communication Skills.pptx
Petroleum Refining & Petrochemicals.pptx
Management Information system : MIS-e-Business Systems.pptx
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
Ad

394753714-hdfc-command-biga data tecnology

  • 1. 1. Create a directory in HDFS at given path(s). Usage: hadoop fs -mkdir <paths> Example: hadoop fs -mkdir /user/saurzcode/dir1 /user/saurzcode/dir2 2. List the contents of a directory. Usage : hadoop fs -ls <args> Example: hadoop fs -ls /user/saurzcode 3. Upload and download a file in HDFS. Upload: hadoop fs -put: Copy single src file, or multiple src files from local file system to the Hadoop data file system Usage: hadoop fs -put <localsrc> ... <HDFS_dest_Path> Example: hadoop fs -put /home/saurzcode/Samplefile.txt /user/saurzcode/dir3/
  • 2. hadoop fs -get: Copies/Downloads files to the local file system Usage: hadoop fs -get <hdfs_src> <localdst> Example: hadoop fs -get /user/saurzcode/dir3/Samplefile.txt /home/ 4. See contents of a file Same as unix cat command: Usage: hadoop fs -cat <path[filename]> Example: hadoop fs -cat /user/saurzcode/dir1/abc.txt 5. Copy a file from source to destination This command allows multiple sources as well in which case the destination must be a directory. Usage: hadoop fs -cp <source> <dest> Example: hadoop fs -cp /user/saurzcode/dir1/abc.txt /user/saurzcode/dir2
  • 3. 6. Copy a file from/To Local file system to HDFS copyFromLocal Usage: hadoop fs -copyFromLocal <localsrc> URI Example: hadoop fs -copyFromLocal /home/saurzcode/abc.txt /user/saurzcode/abc.txt Similar to put command, except that the source is restricted to a local file reference. copyToLocal Usage: hadoop fs -copyToLocal [-ignorecrc] [-crc] URI <localdst> Similar to get command, except that the destination is restricted to a local file reference. 7. Move file from source to destination. Note:- Moving files across filesystem is not permitted. Usage : hadoop fs -mv <src> <dest> Example: hadoop fs -mv /user/saurzcode/dir1/abc.txt /user/saurzcode/dir2 8. Remove a file or directory in HDFS. Remove files specified as argument. Deletes directory only when it is empty Usage : hadoop fs -rm <arg> Example: hadoop fs -rm /user/saurzcode/dir1/abc.txt
  • 4. Usage : hadoop fs -rmr <arg> Example: hadoop fs -rmr /user/saurzcode/ 9. Display last few lines of a file. Similar to tail command in Unix. Usage : hadoop fs -tail <path[filename]> Example: hadoop fs -tail /user/saurzcode/dir1/abc.txt 10. Display the aggregate length of a file. Usage : hadoop fs -du <path> Example: hadoop fs -du /user/saurzcode/dir1/abc.txt