Linux下用jar命令更新jar包文件

jar -uvf SDK_Web_ChartReport.war  view/global/header.jsp
echo '样式文件替换进包中'
 
查看jar包中的文件:
jar -tvf SDK_Web_Common-4.0-SNAPSHOT.jar | grep HostPerfListSqlCreator.class
unzip -v SDK_Web_Common-4.0-SNAPSHOT.jar | grep HostPerfListSqlCreator.class
 

 

 

=========================================================

jar命令各个参数的详细介绍
   -c  建立新的归档
    -t  列出归档的目录
    -x  从归档中撷取已命名的 (或所有) 档案
    -u  更新现有归档
     -v  在标准输出中产生详细输出
    -f  指定归档档案名称
    -m  包含指定清单档案中的清单资讯
    -e  为独立应用程式指定应用程式进入点
        已随附於可执行 jar 档案中
    -0  仅储存;不使用 ZIP 压缩方式
    -M  不为项目建立清单档案
    -i  为指定的 jar 档案产生索引资讯
    -C  变更至指定目录并包含後面所列的档案
 
 
===================================================

[root@Test-SDK4 SDK_Web_Alert]# unzip -h
UnZip 6.00 of 20 April 2009, 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] [-opts[modifiers]] 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 only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields
-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
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives
-I CHARSET specify a character encoding for UNIX and other archives

转载于:https://www.cnblogs.com/linlianhuan/p/9405731.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值