zip 压缩

如何在Debian下创建zip文件?
zip软件包可创建zip格式的压缩文件。
使用如下命令安装:

#aptitude install zip

 


使用方法zip [-derRF...][zipfile [file1 file2 ...]]
基本命令格式是 zip options article inpattern inpattern
article是新的或已存在的zip文件,inpattern是文件夹或文件路径,可包括通配符。
-d 删除zip文件中的文件,如

 

zip -d test.zip test/test

将删除test.zip文件中的test/test
-e 创建密码保护的zip文件
-F 修复zip文件
-r 递归文件夹结构
-R 在当前文件夹中递归
例如:
1.将当前目录下的test1 test2打包为test.zip文件

 

$zip test.zip test1 test2


2.将当前目录下的所有文件和文件夹打包为data.zip,不打包子文件夹。

$zip data *


3.将当前目录file中的所有文件和文件夹打包进file.zip文件,递归子文件夹。

$zip -r file.zip file


4,将当前文件夹中的所有文件打包为data.zip

$zip -R data *


后台执行

nohup zip -r -n wiki.zip wiki &
Last modified onSaturday, 05 January 2013 13:18

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0009412200{main}( ).../index.php:0
20.10404262120Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.10404262120Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.455111452984Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.456011477264Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.457211532592Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.457511559992require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.468611959624K2ControllerItem->execute( ).../k2.php:64
90.468611959624K2ControllerItem->display( ).../BaseController.php:710
100.482312610328K2ControllerItem->display( ).../item.php:78
110.482312610328K2ControllerItem->display( ).../controller.php:19
120.488412981368Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.490713001736K2ViewItem->display( ).../ViewController.php:102
140.570115805888K2ViewItem->display( ).../view.html.php:742
150.570115805888K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.571615978824include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in Debian
  • Read 4332 times
More in this category: « Html 转易 mldonkey 乱码 »

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0009412200{main}( ).../index.php:0
20.10404262120Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.10404262120Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.455111452984Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.456011477264Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.457211532592Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.457511559992require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.468611959624K2ControllerItem->execute( ).../k2.php:64
90.468611959624K2ControllerItem->display( ).../BaseController.php:710
100.482312610328K2ControllerItem->display( ).../item.php:78
110.482312610328K2ControllerItem->display( ).../controller.php:19
120.488412981368Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.490713001736K2ViewItem->display( ).../ViewController.php:102
140.570115805888K2ViewItem->display( ).../view.html.php:742
150.570115805888K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.571615978824include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top