View list of Hadoop Files
>>hadoop fs -ls ..
Creating new Folder
>>hadoop fs -mkdir test
The above created file can be viewed in Hue
Adding Files to Hadoop File System
>>hadoop fs -put Test.txt test
Incase files need to be copied from more than one Directory use put command as Below
>>hadoop fs -put Test1 Test2 Test
Getting Files to Hadoop File System
>>hadoop fs -get Test.txt Test1
Deleting a File from Hadoop File System
>>hadoop fs -rm Test1/Test.txt
In the above case the file will be moved to the Trash
Deleting a File from Hadoop File System
>>hadoop fs -rm -skipTrash Test1/Test.txt
Deleting a File- Recursive Remove
>>hadoop fs -rmr -skipTrash Test1
View part of Data file
>> hadoop fs -cat /user/training/shakespeare.txt | tail -n5
Hadoop – Map Reduce
>> hadoop jar Test.jar T1 output
hadoop jar MapReduce.jar InputFile OutputFolder
Start hdfs daemons
>> start-dfs.sh
Start MapReduce daemons:
>> start-yarn.sh
Verify Hadoop daemons:
>> jps