喜悦国际村 
» 游客:  注册 | 登录 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

【北京】--【低薪】-【诚聘】--- 高级PHP工程师,WEB前台开发工程师

上一主题 下一主题
     
标题: 关于生成zip或rar文件  
 
freespirite (freespirite)
新手上路
Rank: 1
初级会员



UID 64894
精华 0
积分 7
帖子 6
金钱 7 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-6-21
状态 离线
关于生成zip或rar文件

环境linux,网上的都是生成没有密码的压缩文件,如何生成带密码的zip或者rar文件呢
2006-7-6 12:02 PM#1
查看资料  发短消息  QQ  顶部
 
yquan (yquan)
高级会员
Rank: 4
Fooler


UID 15026
精华 1
积分 580
帖子 561
金钱 570 喜悦币
威望 10
人脉 0
阅读权限 50
注册 2002-6-28
状态 离线
[推荐阅读] 请问下获取单元格内容的方法?
C:\Program Files\WinRAR>rar.exe -?

RAR 3.51   Copyright (c) 1993-2005 Alexander Roshal   7 Oct 2005
Registered to Carol Thompson

Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>

<Commands>
  a             Add files to archive
  c             Add archive comment
  cf            Add files comment
  cw            Write archive comment to file
  d             Delete files from archive
  e             Extract files to current directory
  f             Freshen files in archive
  i[par]=<str>  Find string in archives
  k             Lock archive
  l[t,b]        List archive [technical, bare]
  m[f]          Move to archive [files only]
  p             Print file to stdout
  r             Repair archive
  rc            Reconstruct missing volumes
  rn            Rename archived files
  rr[N]         Add data recovery record
  rv[N]         Create recovery volumes
  s[name|-]     Convert archive to or from SFX
  t             Test archive files
  u             Update files in archive
  v[t,b]        Verbosely list archive [technical,bare]
  x             Extract files with full path

<Switches>
  -             Stop switches scanning
  ac            Clear Archive attribute after compression or extraction
  ad            Append archive name to destination path
  ag[format]    Generate archive name using the current date
  ao            Add files with Archive attribute set
  ap<path>      Set path inside archive
  as            Synchronize archive contents
  av            Put authenticity verification (registered versions only)
  av-           Disable authenticity verification check
  c-            Disable comments show
  cfg-          Disable read configuration
  cl            Convert names to lower case
  cu            Convert names to upper case
  df            Delete files after archiving
  dh            Open shared files
  ds            Disable name sort for solid archive
  e[+]<attr>    Set file exclude and include attributes
  ed            Do not add empty directories
  en            Do not put 'end of archive' block
  ep            Exclude paths from names
  ep1           Exclude base directory from names
  ep2           Expand paths to full
  ep3           Expand paths to full including the drive letter
  f             Freshen files
  hp[password]  Encrypt both file data and headers
  id[c,d,p,q]   Disable messages
  ieml[addr]    Send archive by email
  ierr          Send all messages to stderr
  ilog[name]    Log errors to file (registered versions only)
  inul          Disable all messages
  ioff          Turn PC off after completing an operation
  isnd          Enable sound
  k             Lock archive
  kb            Keep broken extracted files
  m<0..5>       Set compression level (0-store...3-default...5-maximal)
  mc<par>       Set advanced compression parameters
  md<size>      Dictionary size in KB (64,128,256,512,1024,2048,4096 or A-G)
  ms[ext;ext]   Specify file types to store
  n<file>       Include only specified file
  n@            Read file names to include from stdin
  n@<list>      Include files in specified list file
  o+            Overwrite existing files
  o-            Do not overwrite existing files
  oc            Set NTFS Compressed attribute
  os            Save NTFS streams
  ow            Save or restore file owner and group
  p[password]   Set password
  p-            Do not query password
  r             Recurse subdirectories
  r0            Recurse subdirectories for wildcard names only
  ri<P>[:<S>]   Set priority (0-default,1-min..15-max) and sleep time in ms
  rr[N]         Add data recovery record
  rv[N]         Create recovery volumes
  s[<N>,v[-],e] Create solid archive
  s-            Disable solid archiving
  sfx[name]     Create SFX archive
  si[name]      Read data from standard input (stdin)
  t             Test files after archiving
  ta<date>      Process files modified after <date> in YYYYMMDDHHMMSS format
  tb<date>      Process files modified before <date> in YYYYMMDDHHMMSS format
  tk            Keep original archive time
  tl            Set archive time to latest file
  tn<time>      Process files newer than <time>
  to<time>      Process files older than <time>
  ts<m,c,a>[N]  Save or restore file time (modification, creation, access)
  u             Update files
  v             Create volumes with size autodetection or list all volumes
  v<size>[k,b]  Create volumes with size=<size>*1000 [*1024, *1]
  vd            Erase disk contents before creating volume
  ver[n]        File version control
  vn            Use the old style volume naming scheme
  vp            Pause before each volume
  w<path>       Assign work directory
  x<file>       Exclude specified file
  x@            Read file names to exclude from stdin
  x@<list>      Exclude files in specified list file
  y             Assume Yes on all queries
  z<file>       Read archive comment from file
2006-7-6 02:17 PM#2
查看资料  Blog  发短消息  QQ  顶部
 
freespirite (freespirite)
新手上路
Rank: 1
初级会员



UID 64894
精华 0
积分 7
帖子 6
金钱 7 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-6-21
状态 离线
[推荐阅读] 没事写了个36选7的小程序
这个是windows下面的参数,linux下gzip,zip没有看到有加密码的参数
2006-7-6 02:50 PM#3
查看资料  发短消息  QQ  顶部
 
yquan (yquan)
高级会员
Rank: 4
Fooler


UID 15026
精华 1
积分 580
帖子 561
金钱 570 喜悦币
威望 10
人脉 0
阅读权限 50
注册 2002-6-28
状态 离线
[推荐阅读] 高手帮助修改一下
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
Zip 2.3 (November 29th 1999). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -y   store symbolic links as the link instead of the referenced file
  -R   PKZIP recursion (see manual)
-e   encrypt                      -n   don't compress these suffixes
2006-7-6 03:02 PM#4
查看资料  Blog  发短消息  QQ  顶部
 
freespirite (freespirite)
新手上路
Rank: 1
初级会员



UID 64894
精华 0
积分 7
帖子 6
金钱 7 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-6-21
状态 离线
[推荐阅读] 娱乐】测试你的成分(结果绝对昏死)
好了用zip -p搞定了,谢啦
2006-7-6 06:02 PM#5
查看资料  发短消息  QQ  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 


Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.028487 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP