Click to See Complete Forum and Search --> : unzip file but to a diff directory


soleblazer
12-07-2001, 01:36 PM
Can someone help me iwth this syntax.

I have seen this and I know its stupid, but I cant get it to work right.

I want to unzip a file into another directory, not the current one.

I was thinking something like unzip -p | cp * /new/folder

Does cp have a option to read from standard in? I am probably using the wrong bulletin from the pipe. Maybe dd? I could easily do this with a script and variables, but I know I can do this right on the command line.

tks

ph34r
12-07-2001, 01:42 PM
mkdir /new/directory
cd /new/directory
unzip /path/to/zipfile

r00t619
12-07-2001, 02:30 PM
unzip -d /newdir foo.zip

soleblazer
12-07-2001, 03:38 PM
ah man, I cant belive it was in the man page, im having a loser friday.

Thanks

jc