tar GNU

tar

经常用tar命令,也知道其几个参数,单总缺乏系统的了解。大概看了一下GNU tar的手册http://www.gnu.org/software/tar/manual/tar.html#SEC28,没有对每个命令和参数都详加了解和实验。大概了解到tar的命令和参数很多,写法也多种多样,感觉只有你想不到,没有tar做不到。GUN软件作者的精神真是让人感动。以下列出最常用的,对某一功能有新的需求时再详细学习。

operations

Exactly one of eight operations is both allowed and required for any instance of using tar. Users may not specify more than one operation.

The Frequently Used Operations

--create’ ‘ -c
Create a new tar archive.
--list’ ‘ -t
List the contents of an archive.
$ tar --list --file=bfiles.tar --wildcards '*b*'
--extract’ ‘ -x’   Extract one or more members from an archive. ‘ --delete’    Deletes members from the archive. ‘ --update’ ‘ -u
Adds files to the end of the archive, but only if they are newer than their counterparts already in the archive, or if they do not already exist in the archive.

Two Frequently Used Options

--file=archive-name’ ‘ -f archive-name’   Specify the name of an archive file. ‘ --verbose’ ‘ -v’   Show the files being worked on as tar is running. ‘ --bzip2’ ‘ -j
This option tells tar to read or write archives through bzip2.
--absolute-names’ ‘ -P
Normally when creating an archive, tarstrips an initial ‘ /
’ from member names. This option disables that behavior.
--gzip’ ‘ --gunzip’ ‘ --ungzip’ ‘ -z
This option tells tar to read or write archives through gzip, allowing tar to directly operate on several kinds of compressed archives transparently.

转载于:https://www.cnblogs.com/mphyfin/archive/2011/08/26/2149984.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值