unable to unzip to opt directory
8,781
Took me a few minutes to see what you were doing wrong. You are using tar
syntax for unzip
and they aren't compatible. You want to run this:
sudo unzip -d /opt/ jstock-1.0.7.17-bin.zip
For tar the syntax is tar xf file.tar -C dir
whereas for unzip it's unzip -d dir file.zip
Related videos on Youtube
Author by
EetSandhu
Updated on September 18, 2022Comments
-
EetSandhu over 1 year
I'm trying to install
jstock
to the/opt
directory. I'm getting the below error.jstock
is in the~/Downloads
directory.- The file name is correct.
Kindly guide.
navjeet@navjeet-Lenovo-G50-80:~/Downloads$ sudo unzip jstock-1.0.7.17 bin.zip -C /opt [sudo] password for navjeet: Archive: jstock-1.0.7.17-bin.zip caution: filename not matched: -C caution:filename not matched: /opt navjeet@navjeet-Lenovo-G50-80:~/Downloads$
Note: bin.zip and -C are separated by space, though it looks otherwise.
-
EetSandhu over 7 yearsIt worked wonders! kudos to you and thanks a lot.. Meanwhile i would like to know more about the differences of tar and unzip.
-
EetSandhu over 7 years@Krishtopher can i use tar to unzip (or untar , if that sounds correct) a .zip file ?
-
Kristopher Ives over 7 yearsNope I just tested
tar
doesn't support .zip files, it does support.tar.gz
and.tar.bz2
files though.