BackgroundAs the company's CMS system, only accept files compressed in RAR format, so it is impossible to directly use the ZIP compression components provided in the Nodejs. Only from the WinRAR software to start, but there is not much on the
Zip:pclzip http://www.phpconcept.net/pclzip/index.en.php
rar:pecl rar Http://pecl.php.net/package/rar
In the past to perform the decompressor under PHP, the most common way is to write command and then use EXEC () and other execution functions to
Zip:pclzip http://www.phpconcept.net/pclzip/index.en.php
rar:pecl rar Http://pecl.php.net/package/rar
In the past to perform the decompression program in PHP, the most common way is to write command and then use EXEC () and other executive functions
Zip:pclzip http://www.phpconcept.net/pclzip/index.en.php
rar:pecl rar Http://pecl.php.net/package/rar
In the past to perform the decompression program in PHP, the most common way is to write command and then use EXEC () and other executive functions
PHP executes the zip and rar decompression methods first. it will be used for further research. Zip: PclZip http://www.phpconcept.net/pclzip/index.en.php
Rar: PECL rar http://pecl.php.net/package/rar
In the past, we had to execute the decompression
Zip: PclZip http://www.phpconcept.net/pclzip/index.en.php
Rar: PECL rar http://pecl.php.net/package/rar
In the past, we had to execute the decompression program in php. The most common method was to write the command and run it using the Execute
The rarfile cannot be decompressed normally in linux. If you want to decompress the rarfile in linux, you must first install a rarlinux software in the system.
Install rarlinux
Wget http://www.rarsoft.com/rar/rarlinux-4.0.1.tar.gzTar-zxvf rarlinux-4.
Install Rarlinux
wget http://www.rarsoft.com/rar/rarlinux-4.0.1.tar.gzTAR-ZXVF rarlinux-4.0.1.tar.gzCD rarMake
See the following information is installed successfully
Mkdir-p/usr/local/binMkdir-p/usr/local/libCP rar Unrar/usr/local/binCP Rarfiles.
Copy CodeThe code is as follows:
#!/usr/bin/env python
# Filename:backup_ver1.py
Import OSImport time
# 1. The files and directories to is backed up is specified in a list.#source =['/home/swaroop/byte ', '/home/swaroop/bin ']source=['
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.