Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views2 pages

Hadoop

The document provides a list of Hadoop file system commands for various operations such as checking the version, adding files, creating directories, and managing files. It includes commands for moving, copying, and removing files and directories within the Hadoop file system. Additionally, it offers commands to check file contents and list directory contents.

Uploaded by

Shubh Gupta
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)
21 views2 pages

Hadoop

The document provides a list of Hadoop file system commands for various operations such as checking the version, adding files, creating directories, and managing files. It includes commands for moving, copying, and removing files and directories within the Hadoop file system. Additionally, it offers commands to check file contents and list directory contents.

Uploaded by

Shubh Gupta
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/ 2

Commands

Pseudo jps
Hadoop fs(for showing commands)
Hadoop fs -help
For checking files in hadpop ( Hadoop fs -ls /)

Hadoop version(for checking the version)


For adding file file into Hadoop : Hadoop fs -put “file_path” “destination path”
For making directory :- Hadoop fs -mkdir /Directory name
For putting file into directory :-hadoop fs -put popularNames.txt
/user/hadoop/dir1/popularNames.txt
To check if file is been added not not:- Hadoop fs -ls SRM
To check content of the file : Hadoop fs -cat /SRM/abc.txt
To remove the file:- Hadoop fs -rm /SRM/abc.txt
To remove directory with the files:--rm -r /SRM

MOVE AND COPY COMMANDS

Hadoop fs -mkdir /A
Hadoop fs-mkdir /B
Hadoop fs -put path of file directory name
To transfer file from one folder to another Hadoop fs -mv /A/abc.txt /B
Hadoop fs -ls /A
To copy files Hadoop fs -cp /B/abc.txt /A
Hadoop fs -get /B/abc.txt /home/cloudera/Desktop
Hadoop fs -tail /abc.txt
Hadoop fs -touchz /srm.txt

You might also like