是指的linux下的tar命令,该命令的用法相当多,以下的内容来自tar的info手册

--numeric-owner
This option will notify 'tar' thar it should use numeric user and group IDs when creating a 'tar' file, rather than names.
This option allows (ANSI) archives to be written without user/group name information or such information to be ignored when extracting. It effectively disables the generation and/or use of user/group name information. This option forces extraction using the numeric ids from the archive, ignoring the names.
This if useful in certain circumstances, when restoring a backup from an emergency floppy with different passwd/group files for example. It is otherwise impossible to extract files with the right ownerships if the password file in use during the extraction does not match the one belonging to the file system(s) being extracted. This occurs, for example, if you are restoring your files after a major crash and had booted from an emergency floppy with no password file or put your disk into another machine to do the restore. --preserve-permissions
--same-permissions
-p
When 'tar' is extracting an archive, it normally subtracts the users' umask from the permissions specified in the archive and uses that number as the permissions to create the destination file. Specifying this option instructs 'tar' that it should use the permission directly from the archive. --same-owner
When extracting an archive, 'tar' will attempt to preserve the owner specified in the 'tar' archive with this option present. This is the default behavior for the superuser; this option has an effect only for ordinary users. --no-same-owner
-o
Do not attempt to restore ownership when extracting. This is the default behavior or ordinary users, so this option has an effect only for the superuser. --show-defaults
Displays the default options used by 'tar' and exits successfully. This option is intended for use in shell scripts. Notice, that this option outputs only one line. --touch
-m
Sets the data modification time of extracted files to the extraction time rather than the data modification time stored in the archive. --verbose
-v
Specifies that 'tar' should be more verbose about the operations it is performing. This option can be specified multiple times for some operations to increase the amount of information displayed. --xz
-J
Use 'xz' for compressing or decompressing the archives. --mode=PERMISSIONS
When adding files to an archive, 'tar' will use PERMISSIONS for the archive members, rather than the permissions from the files. PERMISSIONS can be specified either as an octal number or as symbolic permissions, like with 'chmod' File permissions. Using latter syntax allows for more flexibility. For example, the value 'a+rw' adds read and write permissions for everybody, while retaining executable bits on directories or on any other file already marked as executable. --owner=USER
Specifies that 'tar' should use USER as the owner of members when creating archives, instead of the user associated with the source file.
If USER contains a colon, it is taken to be of the form NAME:ID where a nonempty NAME specifies the user name and a nonempty ID specifies the decimal numeric user ID. If USER does not contain a colon, it is taken to be a user number if it is one or more decimal digits; otherwise it is taken to be a user name. If a name is given but no number, the number if interred from the current host's user database if possible, and the file's user number is used otherwise.
If a number is given but no name, the name is inferred from the number if possible, and an empty name if used otherwise. If both name and nuber are given, the user database is not consulted, and the name and number need not be valid on the corrent host.
There is no value indicating a missing number, and '' usually means 'root'. Some people like to force '' as the value to offer in their distributions for the owner of files, because the 'root' user is anonymous anyway, so that might as well be the owner of anonymous archives. --group=GROUP
Files added to the 'tar' archive will have a group ID of GROUP, rather than the group from the source file. As with '--owner', the argument GROUP can be an existing group symbolic name, or a decimal numeric group ID,or NAME:ID. --ignore-failed-read
Do not exit with nonzero on unreadable files or directories. --keep-old-files
-k
Do not replace existing files from archive. When such a file is encountered, 'tar' issues an error message. Upon end of extraction, 'tar' exits with code . --skip-old-files
Do not replace existing file from archive, but do not treat that as error. Such files are silently skipped and do not affect 'tar' exit status. --delay-directory-restore
Delays restoring of the modification times and permissions of extracted directories until the end of extraction. This way, correct meta-information is restored even if the archive has unusual member ordering. --no-delay-directory-restore
Cancel the effect of the previous 'delay-directory-restore'. Use this option if you have used '--delay-directory-restore' in 'TAR_OPTIONS' varvable and wish to temporarily disable it. --to-stdout
-O
Writes files to the standard output. Use only in conjunction with '--extract' ('--get', '-x'). When this option is used, instead of creating the files specified, 'tar' writes the contents of the files extracted to its standard output. This may be useful if you are only extracting the files in order to send them through a pipe. This option is meaningless with '--list' ('-t'). --remove-files
Remove files after adding them to the archive. --exclude-vcs-ignore
Before archiving a directory, see if it contain any of the following files: '.cvsignore', '.gitignore', '.bzignore', or '.hgignore'. If so, read ignore patterns from these files. --exclude-cvs
Exclude files and directories used by following version control systems: 'CVS', 'RCS', 'SCCS', 'SVN', 'Arch', 'Bazaar', 'Mercurial', and 'Darcs'. --absolute-names
-P
Preserves full file names (including superior directory names) when archiving and extracting files.
Do not strip leading slashes from file names, and permit file names containing a '..' file name component.
When 'tar' extracts archive members from an archive, it strips any leading slashes ('/') from the member name. This causes absolute member names in the archive to be treated as relative file names. This allows you to have such members extracted wherever you want, instead of being restricted to extracting the member in the exact directory named in the archive. Creating a compressed archive is simple: you just specify a "compression option" along with the usual archive creation commands.
The compression option is '-z' ('--gzip') to create a 'gzip' compressed archive, '-j' ('--bzip2') to create a 'bzip2' compressed archive, '--lzip' to create an lzip compressed archive, '-J' (--xz) to create an XZ archive, '--lzma' to create an LZMA compressed archive, '--lzop' to create an LSOP archive, and '-Z' ('--compress') to use 'compress' program. tar处理压缩文件的时候是使用的其它软件包提供的可执行文件,但是当该软件包没有安装的时候,tar会尝试用另一个软件包来取代。 Compressed archives are easily corrupted, because compressed files have little redundancy. The adaptive nature of the compression scheme means that the compression tables are implicitly spread all over the archive. If you lose a few blocks, the dynamic construction of the compression table becomes unsynchronized, and there is little chance that you could recover later in the archive. --auto-compress
-a
Select a compression program to use by the archive file name suffix. --use-compress-program=COMMAND
-I=COMMAND
Use external compression program COMMAND. Use this option if you are not happy with the compression program associated with the suffix at compile time or if you have a compression program that GNU 'tar' does not support. The COMMAND argument is a valid command invocation, as you would type it at the command line prompt, with any additional options as needed. Enclose it in quotes if it contains white space.
The COMMAND should follow two conventions:
First, when invoked without additional options, it should read data from standard input, compress it and output it on standard output.
Secondly, if invoked with the additional '-d' option, if should do exactly the opposite.
The latter requirement means that you must not use the '-d' option as a part of the COMMAND itself. When '--dereference' ('-h') is used with '--create' ('-c'), 'tar' archives the files synbolic links point to, instead of the links themselves. --check-links
-l
Check the number of links dumped for each processed file. If this number does not match the total number of hard links for the file, print a warning message. --hard-dereference
Dereference hard links and store the files they refer to.
当创建归档的时候,使用该选项可以为硬链接各自保存归档。否则tar默认只保留一份归档。

tar命令参数笔记的更多相关文章

  1. linux Tar 命令参数详解

    tar命令 . 作用 tar命令是Unix/Linux系统中备份文件的可靠方法,几乎可以工作于任何环境中,它的使用权限是所有用户. . 格式 tar [主选项+辅选项] 文件或目录 eg: tar z ...

  2. tar 命令参数解释

    tar 命令 tar [-cxtzjvfpPN]文件与目录参数说明:-c :建立一个打包文件:-x :解开一个打包文件:-t :查看 tar包里面的文件:(特别注意,在选择参数时,c/x/t仅能存在一 ...

  3. tar命令参数详解

    命令总览:tar [-]A --catenate --concatenate | c --create | d --diff --compare | r --append | t --list | u ...

  4. gcc/g++命令参数笔记

    1. gcc -E source_file.c -E,只执行到预编译.直接输出预编译结果. 2. gcc -S source_file.c -S,只执行到源代码到汇编代码的转换,输出汇编代码. 3. ...

  5. linux中的tar命令的使用

    参考网址: https://www.cnblogs.com/newcaoguo/p/5896975.html https://www.cnblogs.com/xccjmpc/p/6035397.htm ...

  6. tar -h 参数

    1.1.1 tar命令参数-h,-h参数会把软链接指向的文件也打包. [root@ob2 mytmp]# ll total 8 -rw-r--r--. 1 root root 910 Aug 12 2 ...

  7. linux gcc命令参数

    gcc命令参数笔记 1. gcc -E source_file.c -E,只执行到预处理.直接输出预处理结果. 2. gcc -S source_file.c -S,只执行到汇编,输出汇编代码. 3. ...

  8. 3_yum rpm tar 命令及参数

    这个就是把上课听课时写下的笔记给复制粘贴过来了,如果写的不够详细或者哪里不明白,可以写在评论下面,我会一一个回复的:   1.yum centos 上 一般是yum  提供了安装包的查找安装及其删除  ...

  9. linux中的 tar命令的 -C 参数,以及其它一些参数(转)

    linux中的 tar命令的 -C 参数,以及其它一些参数 复制源:http://www.cnblogs.com/li-hao/archive/2011/10/03/2198480.htmltar命令 ...

随机推荐

  1. Windows Phone 8 Sync

    A lot of the below depends on the types of data, how often it is changing, and how often it is likel ...

  2. Js中this用法及注意点详解

          我们在写js时,特别是用到回调函数时,经常会发现this指代的对象总是可能脱离自己的思路而发生改变.面向对象语言的特性告诉我们this始终指代它的调用者,而在js中回调函数中内部的this ...

  3. 如何防御“神器”Mimikatz窃取系统密码?

    Mimikatz是一款能够从Windows中获取内存,并且获取明文密码和NTLM哈希值的神器,本文将介绍如何防御这款软件获取密码. Mimikatz介绍 Mimikatz是一款能够从Windows认证 ...

  4. Android SDK 镜像站

    Android SDK镜像的介绍使用  http://www.androiddevtools.cn 镜像站地址   由于一些原因,Google相关很多服务都无法访问,所以在很多时候我们SDK也无法升级 ...

  5. div自定义的滚动条 (水平导航条)

    <!DOCTYPE html> <html> <head> <title></title> <style> div{ /* wi ...

  6. 表单的enctype property

    enctype 属性规定在发送到服务器之前应该如何对表单数据进行编码. 默认地,表单数据会编码为 "application/x-www-form-urlencoded".就是说,在 ...

  7. 【iCore3 双核心板】例程九:ADC实验——电源监控

    实验指导书及代码包下载: http://pan.baidu.com/s/1o7wSEO6 iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  8. php一些特殊函数的使用实例详解

    <?php /* * PHP Array 函数大全 * * array() 创建数组. 3 array_change_key_case() 返回其键均为大写或小写的数组. 4 array_chu ...

  9. js == 判断

    根据阮一峰介绍的算法文章分12部分可判断: 如果x不是正常值(比如抛出一个错误),中断执行. 如果y不是正常值,中断执行. 如果Type(x)与Type(y)相同,执行严格相等运算x === y. 如 ...

  10. 20145209&20145309信息安全系统设计基础实验报告 (3)

    实验内容.步骤与体会: 实验过程的理解,实验指导书中知识点的理解. (1)为什么在双击了GIVEIO和JTAG驱动安装文件后还需要手动进行配置? 因为安装文件只是将驱动文件释放了出来,并没有在系统中将 ...