Skip to content

Instantly share code, notes, and snippets.

@DarkDesire
Created May 22, 2019 09:00
Show Gist options
  • Save DarkDesire/02540b4bf436f98cf7c1d59e4818026f to your computer and use it in GitHub Desktop.
Save DarkDesire/02540b4bf436f98cf7c1d59e4818026f to your computer and use it in GitHub Desktop.
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