免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 853 | 回复: 0
打印 上一主题 下一主题

tar命令 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-10 15:47 |只看该作者 |倒序浏览
tar命令简单介绍
      
tar  [options] tarfile [filename]
operation:
    One of the following options must be used:
       -A, --catenate, --concatenate
              append tar files to an archive
       -c, --create
              create a new archive
       -d, --diff, --compare
              find differences between archive and file system
       -r, --append
              append files to the end of an archive
       -t, --list
              list the contents of an archive
       -u, --update
              only append files that are newer than the existing in archive
       -x, --extract, --get
              extract files from an archive
       --delete
              delete from the archive (not for use on mag tapes!)
options:
       -C, --directory DIR
              change to directory DIR
       -f, --file [HOSTNAME:]F
              use archive file or device F (default "-", meaning stdin/stdout)
       -j, --bzip2
              filter archive through bzip2, use to decompress .bz2 files
       -p, --preserve-permissions
              extract all protection information
       -v, --verbose
              verbosely list files processed
       -z, --gzip, --ungzip
              filter the archive through gzip
EXAMPLES
       tar -xvf foo.tar
              verbosely extract foo.tar
       tar -xzf foo.tar.gz
              extract gzipped foo.tar.gz
       tar -cjf foo.tar.bz2 bar/
              create bzipped tar archive of the directory bar called foo.tar.bz2
       tar -xjf foo.tar.bz2 -C bar/
              extract bzipped foo.tar.bz2 after changing directory to bar
       tar -xzf foo.tar.gz blah.txt
              extract the file blah.txt from foo.tar.gz
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/93336/showart_1923681.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP