How to unzip a file in hadoop


#2

try:

tar xzf <<<<<file name>>>>>


#1

nyse/nyse_data.tar.gz , want to unzip …


Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster


#4

@tejasvini

Go to the folder where the tar files are present.
In your case, you can go

cd nyse/
tar -zxf nyse_data.tar.gz

#3

its there in hadoop /data-master/nyse/nyse_data.tar.gz


#5

thanks nikhil
i have done that in my local system but how to do in hadoop fs to unzip


#6

@tejasvini

ex:
tar zcvf hello.tar.gz hello | hadoop fs -put hello.tar.g z /user/nikhilvemula

syntax:
tar zcvf <compressed file name>.tar.gz <source file 1> <source file 2> | hadoop fs -put <source file> <destination location>

Here
hello is the source file which is to be compressed .tar.gz
followed by the put command and the source file name, HDFS location