Created
May 22, 2019 09:00
-
-
Save DarkDesire/02540b4bf436f98cf7c1d59e4818026f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mypath="/hdfspath/to/data/" | |
myzip="name of myfile" # without the .zip extension | |
hadoop fs -chmod 777 "$mypath" | |
hadoop fs -ls "$mypath$myzip.zip".* | |
hadoop fs -cat "$mypath$myzip.zip".* > file.zip | |
ls -la | |
unzip file.zip -d "$myzip" | |
ls -la "$myzip/" | |
hadoop fs -put -f $( echo "$myzip/" | sed s/\ /\%20/g ) "$mypath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment