CentOS 6 unzip file but files are going to root folder instead

Jony kale picture Jony kale · Feb 21, 2013 · Viewed 35k times · Source

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

Answer

Milad.Nozari picture Milad.Nozari · Feb 21, 2013

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