tags:

views:

125

answers:

2

My backup.zip has the following structure.

OverallFolder

lots of files and subfolders inside

i used this unzip backup.zip -d ~/public_html/demo

so i end up with ~/public_html/demo/OverallFolder/my other files.

How do i extract so that i end up with all my files INSIDE OverallFolder GOING DIRECTLY into ~public_html/demo?

~/public_html/demo/my other files like this?

A: 

if you can't find any options to do that, this is the last resort

mv ~/public_html/demo/OverallFolder/* ~/public_html/demo/

ghostdog74
it worked thanks!
A: 
(cd ~public_html/demo; unzip $OLDPWD/backup.zip)

This, in a subshell, changes to your destination directory, unzips the file from your source directory, and when the subshell exits, leaves you back in your source directory.

That, or something similar, should work in most shells.

Dennis Williamson