4

When I did

unzip /var/www/html/web.zip 

It unzipped the zip to /root/ folder. I need it to unzip the files to /var/www/html/

why is it happening?

CentOS 6.3 64bit

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Jony kale
  • 85
  • 1
  • 1
  • 7

3 Answers3

14

try this:

unzip /var/www/html/web.zip -d /var/www/html/

your command extracts the archive content to the current directory. you can check if your in /root using the following command

pwd
Milad.Nozari
  • 2,243
  • 3
  • 26
  • 47
9

Do:

cd /var/www/html/
unzip web.zip
piokuc
  • 25,594
  • 11
  • 72
  • 102
0

To learn more about unzip, you can try running below command. this will return you all options possible with unzip

unzip -man

UserASR
  • 2,015
  • 4
  • 24
  • 47