How to unzip a file in hadoop



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


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



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

cd nyse/
tar -zxf nyse_data.tar.gz


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


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



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

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

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