I want to unzip a zip archive on server and keep original zip file with is as well.
When I use unzip myFile.zip
command it only adds extracted myFile
but removes the original myFile.zip
file.
So what command should I use to keep original file with extracted file?
unzip
doesn't copy the archive, it only extracts files from it. To copy the archive to a directory, use cp
:
unzip myFile.zip -d home/ubuntu/directoryPath
cp myFile.zip home/ubuntu/directoryPath
The original myFile.zip
isn't removed, it still exists in the location you extracted the files from.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With