To zip a file (or multiple files) in a zip (compressed format for distribution, saving disk space or emailing as attachment), you can use the zip utility present in allmost all the linux distros.
To check if you have zip installed on your machine type
# zip -h
if it is not present, it can be installed via yum Hence the task
# yum install zip # yum install unzip
Or if you prefer apt over yum then run the following commands:
# apt-get install zip # apt-get install unzipNext you can zip files by running the following command. No need to add .zip file extension as it will be added by the zip utility:
$ zip myZip_FileName *To compress a directory (and all sub-directories within it) run:
$ zip -r myZipped_FolderName *To decompress (or deflate or unzip) the zip simply run the following command from your command prompt:
$ unzip zippedFile.zipTo simply view the contents of a zip and not actually unzip it run:
$ unzip -tq zippedFile.zipTo unzip the contents of a zip in a new directory (for avoiding clutter and confusion) run:
$ unzip zippedFile.zip -d /Folder_to_Unpack_into
1 comment:
Help, I zipped my whole drive.
Post a Comment