Unzip files in hdfs

0 votes
I have a zip file in hdfs. I want to unzip it. how to do it?
Jul 31, 2019 in Big Data Hadoop by Judy
6,520 views

1 answer to this question.

0 votes

To unzip a gzipped (or bzipped) file, I use the following:

hdfs dfs -cat /data/<data.gz> | gzip -d | hdfs dfs -put - /data/
answered Jul 31, 2019 by Joe

Hello, good morning/afternoon/evening!
I know it's over 4 years, but you don't happen to know how to do this with a zip file (no gzip).
 

I've been trying:
hdfs dfs -text {the_zip_path} | unzip -p | hdfs dfs -put - {hdfs_path_to_folder} 

I've got it complaining with -cat, I've got it creating a file called - in the folder in HDFS. I'm lost here! Thanks in advance! 

PS: The zip file it's not negotiable, it's a third-party provided file, and we asked them if we could get gzip, and they said no.

Related Questions In Big Data Hadoop

0 votes
5 answers
0 votes
1 answer

Files for Configuring HDFS in Hadoop 2.2.0?

By default these Hadoop configuration files are ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
908 views
+1 vote
1 answer

How can we list files in HDFS directory as per timestamp?

No, there is no other option to ...READ MORE

answered May 8, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
12,276 views
0 votes
1 answer

What is the standard way to create files in your hdfs file-system?

Well, it's so easy. Just enter the below ...READ MORE

answered Sep 23, 2018 in Big Data Hadoop by Frankie
• 9,830 points
2,705 views
+1 vote
2 answers

What does hadoop fs -du command gives as output?

du command is used for to see ...READ MORE

answered Jul 24, 2019 in Big Data Hadoop by Lokesh Singh
6,049 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,547 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,411 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,630 views
0 votes
5 answers

Hadoop hdfs: list all files in a directory and its subdirectories

Hi, You can try this command: hadoop fs -ls ...READ MORE

answered Aug 1, 2019 in Big Data Hadoop by Dinish
18,748 views
+1 vote
1 answer

How to read HDFS and local files with the same code in Java?

You can try something like this: ​ ...READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 69,220 points
4,895 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP