Chinaunix首页 | 论坛 | 博客
  • 博客访问: 56863
  • 博文数量: 19
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 177
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-25 21:11
文章分类

全部博文(19)

文章存档

2011年(1)

2009年(18)

我的朋友

分类: LINUX

2009-05-10 15:47:42

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

阅读(741) | 评论(0) | 转发(0) |
0

上一篇:在子目录中grep

下一篇:spinlock作用

给主人留下些什么吧!~~