Резервное копирование в linux

Limitations

zipsplit does not support splitting archives that are larger than 2 gigabytes.

zipsplit offers very little control over how it decides to split up your archive. If one of the files inside your archive is very large, you may not be able to split the archive at all, because zipsplit cannot span a single archived file across multiple zipfiles.

The default maximum size of a split file is approximately 36 kilobytes, which by modern standards is very small. If you want or need to create splits larger than 36 Kb, you must specify a different maximum size using the -n option.

There is no convenient way to re-assemble a set of split zip archives into a single unified archive. Concatenating them manually and then «fixing» the concatenated file with zip‘s -FF option is possible, however. For example, if your split files are named archive01.zip, archive02.zip, etc. you could concatenate them into a new file, whole.zip, with the command:

cat archive*.zip > whole.zip

…and then «fix» whole.zip (re-build its index), using the command:

zip -FF whole.zip --out fixed.zip

…which would leave you with a re-assembled archive named fixed.zip.

Trademark Information

The products, brand names, trademarks, logos and service marks («Marks») displayed on this Web site are the trademarks or registered trademarks of WinZip Computing or other third parties. You are not permitted to use the Marks without the prior written consent of WinZip Computing or such third party which may own the Marks. Appearance of third party trademarks on this Web site does not constitute an endorsement or a recommendation of those third parties and is not intended to
imply that such third parties endorse or have any affiliation with WinZip
Computing unless otherwise specified.
«WinZip» is a registered trademark of Corel Corporation.

Microsoft, Windows, Windows Vista, Excel, PowerPoint, Outlook, Internet Explorer, the Windows logo and the Windows Vista Start button are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Intel and Pentium are registered trademarks of Intel Corporation or its subsidiaries in the United States and/or other countries.

Adobe and Acrobat are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Autodesk and AutoCAD are registered trademarks or trademarks of Autodesk, Inc., in the United States and/or other countries.

How to Use Pattern Matching and Piping to Create an Archive

The next switch is a really useful one because it lets you use the output of other commands to insert files into your zip file. Assume you want to create a file called lovesongs.zip, which contains every song which has the word love in the title.

To find the files with love in the title you can use the following command:

find /home/yourname/M

The above command isn’t 100 percent perfect because it picks up words like «clover» as well, but you get the idea. To add all the returned results from the above command to a zip file called lovesongs.zip, run this command:

find /home/yourname/Music -name *love* | zip lov

IZArc

What We Like

  • Multilingual interface.

  • Extensive file format support.

What We Don’t Like

  • No customizable compression settings.

  • Slower than 7Zip.

IZArc is a free compression and extraction utility that works with 40+ archive file types, can repair broken archives, and supports scanning archives for viruses before opening them.

The program is easy to use because it can be integrated with the right-click context menu in Windows. You can use this menu to quickly open or extract any of the supported unpacking formats.

There’s a really helpful feature in IZArc that lets you convert between archive formats, such as RAR to ZIP and many other variations of all sorts of formats. This is also true for CD images, meaning that you could make an ISO file from a BIN, MDF, NRG, or NDI file.

Archives created with IZArc can be password-protected with 256-bit AES encryption or ZipCrypto.

A portable download called IZArc2Go is also available on the download page, plus a command line tool and an iOS app.

Cómo usar Zip y Unzip en Linux

Ahora que sabemos cómo instalar en Linux el paquete que usa el comando Unzip, podemos comenzar a aprender los usos básicos del mismo:

Crear archivos zip en Linux

La sintaxis básica para crear un archivo .zip es:

zip options zipfile list_Of_files

Para probar esto, creamos dos archivos: ExampleFile.txt y ExampleFile1.txt. Los comprimiremos en sampleZipFile.zip con el siguiente comando:

zip sampleZipFile.zip ExampleFile.txt ExampleFile1.txt

Usar en Linux el comando Unzip para descomprimir un archivo

El comando Unzip se puede usar sin ninguna opción. Esto descomprimirá todos los archivos en el directorio actual. Veamos un ejemplo de esto:

unzip sampleZipFile.zip

Esto descomprimirá de manera predeterminada el archivo sampleZipFile.zip en la carpeta actual, siempre que tengas acceso de lectura y escritura.

Splitting An Archive

Let’s say you have a zipfile named archive.zip that is about 50 megabytes in size, and you want to split it into pieces that are no larger than 1 megabyte. You could use this command:

zipsplit -n 1048576 archive.zip

…which will tell zipsplit to create a sequence of zipfiles, each no larger than 1048576 bytes (one megabyte), which collectively contain the same files as archive.zip. The output of this command will look something like this:

66 zip files will be made (70% efficiency)
creating: archive01.zip
creating: archive02.zip
creating: archive03.zip
...
creating: archive66.zip

The result in this case was 66 new files, archive01.zip through archive66.zip, which together contain the same files as archive.zip.

archive.zip is unchanged by this process.

Создание RAR архивов в Linux

Для создания RAR архивов в Linux используется пакет RAR.

Создать RAR архив

Для создания RAR архивов используется опция a команды rar. Например, заархивируем директорию mydir в файл archive.rar:

В результате будет создан архив archive.rar, который содержит только файлы, расположенные непосредственно в директории mydir, не включая вложенные директории.

Чтобы заархивировать директорию полностью, включая все вложенные файлы и директории, используется опция -r (recursive):

Можно указать список файлов, которые нужно заархивировать:

Указать степень сжатия

Чтобы указать степень сжатия, используется опция -mЧИСЛО, для которой указывается число от 0 до 5. 0 — без сжатия, 1 — минимальное сжатие, 5 — максимальное. По умолчанию используется степень сжатия — 3. Пример создания архива с максимальной степенью сжатия:

Разбить архив на несколько файлов

Используя опцию -vРАЗМЕР можно создать архив, который будет разбит на несколько файлов. Для указания размера нужно использовать обозначения: M — мегабайты, k — килобайты, b — байты. Например, создадим архив, который разобьем на файлы размером 100 мегабайт:

Распаковать такой архив можно обычными средствами команды rar. Только в качестве архива нужно указать первый файл: rar x archive.part01.rar

Создать архив с паролем

Чтобы создать архив, защищенный паролем, используется опция -p:

Для существующего RAR-архива также можно задать пароль:

В результате выполнения данной команды появится запрос на ввод пароля.

Распаковать архив

Команда rar, как и описанная выше команда unrar, умеет распаковывать архивы. Для распаковки архивов используется опция x:

Другие возможности команды RAR

Команда rar обладает внушительным количеством опций. Полное описание команды rar можно получить, выполнив в терминале:

Install zip and unzip linux command line tools

By default, the zip/unzip command is not installed on most linux distros. So, you’ve to install it to use the commands. I’ve already explained it in a previous tutorial about linux zip command, check that out for more details.

Anyway, here’s how to install them on Ubuntu, Linux Mint or any Debian based distos.

sudo apt-get install zip unzip

That’s all you need to install on Ubuntu, if you’re using Arch Linux, Frdora, opneSUSE, CentOS etc. etc. I’m quite sure that I don’t need to tell you how to install them.

Linux unzip files

To extract the ZIP files, you can use the unzip linux command, an example below.

unzip my_archive.zip

To extract a ZIP file located on different directory, you’ve to use the full path.

unzip ~/Documents/html/backup_2.zip

And if you need to unzip multiple files at once in Linux, append their names one by one or use the wildcard.


Try AmazonPrime for free Enjoy free shipping and One-Day delivery, cancel any time.

unzip archive_1.zip archive_2.zip archive_3.zip
unzip *.zip     # To extract all the ZIP files present on a folder

Linux unzip files to specific directory

Many time you’ll need to extract the ZIP archives to a specific directory, in that case, you’ve to use the flag along with the linux unzip command , typical syntax is like below.

unzip -d /path/to/destination/directory /path/to/archive.zip

As an example, have a look at the command below, though it’s pretty arbitrary.

unzip -d ../text/ ../Documents/html/IoT_revolution.zip

Extract password protected ZIP files

If your ZIP file is password protected, then you have to use the option with linux unzip command.

unzip -P secret_ password my_archive.zip

A more legible example could be like below,

unzip -P "1t's_s3cr3t" secret_info.zip -d /tmp/secret/

Here read more about how you can password protect zip files.

Listing contents of a ZIP archive

If you need to just look inside a zip file without extracting it, the option is useful.

unzip -l ../Documents/html/IoT_revolution.zip
Archive:  ../Documents/html/IoT_revolution.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2017-09-27 20:15   IoT_revolution/
   150977  2016-02-11 16:40   IoT_revolution/iot_img.jpg
     5851  2017-09-22 09:45   IoT_revolution/custom_bg.jpg
     7240  2017-09-27 20:15   IoT_revolution/iot_revolution_article.html
    48924  2017-09-22 09:50   IoT_revolution/style_min.css
---------                     -------
   212992                     5 files

Excluding specific files while unzipping

After getting an overview of the contents, if you need to unzip a file but want to exclude some specif file, you have to use the flag along with command.

Let’s take the IoT_revolution.zip archive, used in previous example. I want to exclude the images, using the wildcard also applies here.

unzip ../Documents/html/IoT_revolution.zip -x *.jpg *.png

Another example, let’s assume I want to exclude the style_min.css file of that archive.

unzip ../Documents/html/IoT_revolution.zip -x style_min.css

Extract zip files without preserving full path

If the ZIP file is structured with multiple folders and files, but you want to extract everything under a single directory, then use the option.

unzip -jq ../Downloads/Andromeda-master.zip

The option is used to suppress the output of the unzip command.

Feedback

Unless otherwise explicitly stated herein or in the WinZip Computing Privacy Policy, any non-personal information or material sent to WinZip Computing will be deemed NOT to be confidential. By sending WinZip Computing any non-personal information or material (including comments, feedback, bug reports, piracy reports, or product suggestions,) you grant WinZip Computing an unrestricted, irrevocable license to use, reproduce, display, perform, modify, transmit and distribute those materials or information, and you also agree that WinZip Computing is free to use any ideas, concepts, know-how or techniques that you send us for any purpose. However, we will not release your name or otherwise publicize the fact that you submitted materials or other information to us unless: (a) you grant us permission to do so; (b) we first notify you that the materials or other information you submit to a particular part of a site will be published or otherwise used with your name on it; or (c) we are required to do so by law.

Options

-t Report how many files it will take to perform the split, but don’t actually split anything.
-i Create a zip index named zipsplit.idx, and include its size in the first zip file.
-n size Create zipfiles no larger than size bytes. For the split to be successful, size must be larger than the largest file in the original zipfile. Default is 35978 bytes.
-r room Make the first split file smaller by room bytes. This option can be useful if you intend to store the split zipfiles on removable disks, and you need extra space on the first disk for other software, such as an executable file to decompress the archives. The default value of room is zero.
-b path Output zip files into the path path.
-p Pause between each zip file that is output.
-s Perform a sequential split even if it requires more zip files. In other words, make sure that the order of files in the split archives exactly matches the order of files as they appear in the original archive; do not «shuffle them around» when splitting them up.
-h Display a help message, and exit.
-v Display version information, and exit.
-L Display software licensing information, and exit.

See unzip command options

Type the following command:

unzip 
unzip -h

Sample outputs:

UnZip 5.52 of 28 February 2005, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
 
Usage: unzip -Z -optsmodifiers file.zip list -x xlist -d exdir
  Default action is to extract files in list, except those in xlist, to exdir;
  file.zip may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).
 
  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
 
modifiers:                                   -q  quiet mode (-qq => quieter)
  -n  never overwrite existing files         -a  auto-convert any text files
  -o  overwrite files WITHOUT prompting      -aa treat ALL files as text
  -j  junk paths (do not make directories)   -v  be verbose/print version info
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
Examples (see unzip.txt for more info):
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer

Sobrescribir archivos Zip

Cuando descomprimes un mismo archivo más de una vez en la misma ubicación donde, de manera predeterminada aparecerá un mensaje que te preguntará si deseas sobrescribir el archivo actual, sobrescribir todos los archivos, omitir la extracción del archivo actual, omitir la extracción de todos los archivos o renombrar el archivo actual.

Las opciones serían las que se muestran a continuación:

es, o, ll, one, ename

O puedes sobrescribir todos los archivos utilizando la opción -o. Te mostramos un ejemplo:

unzip -o sampleZipFile.zip

Debes tener precaución al ejecutar este comando ya que esto sobrescribirá por completo las copias existentes. Cualquier cambio realizado en la copia anterior se sobrescribirá.

How to Add New Files to an Existing Zipped Archive

If you want to add new files to an existing archive or update the files in an archive, use the same name for the archive file when running the zip command.

For example, imagine you have a music folder with four albums in it and you create an archive called music.zip to keep as a backup. Now imagine one week later you download two new albums. To add the new albums to the zip file, simply run the same zip command as you did the previous week.

To create the original music archive run the following code:

zip -r music /hom

To add new files to the archive run the same command again. 

If the zip file has a list of files in it and one of the files on the disk has changed, then the amended file is updated in the zip file. 

How to Update the Existing Files in a Zipped Archive

If you have a zip file that is supposed to contain the same file names every time and you want to update that file with any changes that have been made to those files then the -f switch helps you do this.

For example, imagine you have a zipped file with the following files:

/home/yourname/documents/file1

/home/yourname/documents/file2

/home/yourname/documents/file3

/home/yourname/documents/file4

/home/yourname/documents/file5

/home/yourname/documents/file6

Now imagine that during the week, you added two new files and amended two files so that the folder /home/yourname/documents now looks like this:

/home/yourname/documents/file1

/home/yourname/documents/file2

/home/yourname/documents/file3

/home/yourname/documents/file4 (updated)

/home/yourname/documents/file5 (updated)

/home/yourname/documents/file6

/home/yourname/documents/file7

/home/yourname/documents/file8

When you run the following command the zip file will contain the updated files (file4 and file5) but file7 and file8 will not be added.

zip zipfilename -f -r /home/y

CAM UnZip

What We Like

  • Fast and lightweight.

  • User-friendly tabbed interface.

What We Don’t Like

  • Annoying banner ad.

  • No full-context menu integration.

CAM UnZip is a free compressor and file extractor that works with ZIP files. It supports drag and drop to quickly open a ZIP file and can create password-protected archives.

There’s an interesting feature in CAM UnZip where the program can be configured to automatically run a «setup.exe» file if one is extracted from a ZIP archive. This can greatly speed things up if you’ll be extracting lots of setup files.

During install, you’re given the option to install CAM UnZip as a portable program that can be launched from a removable drive, or, of course, as a regular one that runs from your computer.

Arguments

unzip accepts the following arguments:

file[.zip] Path of the zip archive(s). If the file specification is a wildcard, each matching file is processed in an order determined by the operating system (or file system). Only the filename can be a wildcard; the path itself cannot. Wildcard expressions are similar to those supported in commonly used Unix shells (sh, ksh, csh) and may contain:

* matches a sequence of 0 or more characters
? matches exactly 1 character
matches any single character found inside the brackets; ranges are specified by a beginning character, a hyphen, and an ending character. If an exclamation point or a caret (‘!‘ or ‘^‘) follows the left bracket, then the range of characters within the brackets is complemented (that is, anything except the characters inside the brackets is considered a match). To specify a verbatim left bracket, the three-character sequence «» has to be used.

(Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.) If no matches are found, the specification is assumed to be a literal filename; and if that also fails, the suffix .zip is appended. Note that self-extracting zip files are supported, as with any other zip archive; just specify the .exe suffix (if any) explicitly.

[file(s)] An optional list of archive members to be processed, separated by spaces. (VMS versions compiled with VMSCLI defined must delimit files with commas instead. See -v in below.) Regular expressions (wildcards) may be used to match multiple members, as stated above. Again, be sure to quote expressions that would otherwise be expanded or modified by the operating system.
[-x xfile(s)] An optional list of archive members to be excluded from processing. Since wildcard characters normally match (») directory separators (for exceptions see the option -W), this option may be used to exclude any files that are in subdirectories. For example, «unzip foo *. -x */*» would extract all C source files in the main directory, but none in any subdirectories. Without the -x option, all C source files in all directories within the zipfile would be extracted.
[-d exdir] If specified, files will be extracted to directory exdir. By default, all files and subdirectories are recreated in the current directory; the -d option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). This option need not appear at the end of the command line; it is also accepted before the zipfile specification (with the normal options), immediately after the zipfile specification, or between the file(s) and the -x option. The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed. In particular, «-d ~» (tilde) is expanded by Unix C shells into the name of the user’s home directory, but «-d~» is treated as a literal subdirectory «~» of the current directory.

Zipeg

What We Like

  • Online video tutorials.

  • Thumbnail previews of zipped images.

What We Don’t Like

  • Moderate to high resource consumption.

  • Slow-loading previews.

Zipeg is another free archive extractor similar to the others in this list that supports common formats like RAR, TAR, and ZIP, plus several others.

Zipeg doesn’t allow the creation of new archives, but it handles unzipping files just fine. When the program first opens, you get to choose which file extensions you want to be associated with the program so that you can be sure that Zipeg is the one that opens all of your archives.

One particular feature worth noting is the option to automatically open nested archives, meaning that Zipeg will open archives stored within the archive, automatically. While this isn’t very common, it is helpful when you run into an archive like that.

While there isn’t support for showing Zipeg in the right-click context menu, which makes unzipping files really easy, Zipeg does support drag and drop into its program window.

ZipGenius

What We Like

  • Full-context menu integration.

  • Lightweight and portable.

What We Don’t Like

  • Inadequate help file.

  • Buggy performance.

Another free archive extractor and compressor for Windows only is ZipGenius.

Several formats are supported with ZipGenius, for both creating and extracting archives. You can password-protect new archives, automatically exclude particular file types when compressing files, and even split an archive into several smaller parts for easier web sharing or storage.

When extracting an archive with ZipGenius, you can set up an antivirus program to automatically scan the results to ensure you’re not opening an infected archive.

ZipGenius also supports converting an archive to the ZIP format to easily change the file type to this popular one. There’s also an option in the settings to set the priority of ZipGenius to control how many system resources can be allocated to it when compressing and decompressing files.

Governing Law and Jurisdiction

This Web site (excluding linked sites) is controlled by WinZip Computing from its office within the state of Connecticut, USA. By accessing this Web site, you and WinZip Computing agree that all matters relating to your access to, or use of, this Web site shall be governed by the statutes and laws of the state of Connecticut, without regard to the conflicts of laws principles thereof. You and WinZip Computing also agree and hereby submit to the exclusive personal jurisdiction and venue of the courts of Hartford County with respect to such matters. WinZip Computing makes no representation that materials on this Web site are appropriate or available for use in other locations, and accessing them from territories where their contents are illegal is prohibited. Those who choose to access this site from other locations do so on their own initiative and are responsible for compliance with local laws.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector