Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23637
  • 博文数量: 20
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 207
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-26 09:51
文章分类

全部博文(20)

分类: LINUX

2013-08-26 16:24:25

In windows,
the precondition to use jar is you must install JDK in your PC
the command line for packing folder is

点击(此处)折叠或打开

  1. jar cvfM folder.jar folder
the command line for unpacking folder is

点击(此处)折叠或打开

  1. jar xvf folder.jar

In unix
upload the folder.jar to sever, and unpack folder.jar.
using this method, we can pack files in windows and unpack files in unix complete automatically

点击(此处)折叠或打开

  1. unzip folder.jar
  2. zip -r folder.zip folder

tar also can pack/unpack

点击(此处)折叠或打开

  1. #pack
  2. tar -cvzf folder.tar.gz folder
  3. #unpack
  4. tar -xvzf folder.tar.gz
  5. tar -xvzf folder.tar.gz -C /var/tmp
  6. #look up
  7. tar -tf folder.tar.gz


阅读(182) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~