-M, --multi-volume create/list/extract multi-volume archive --rmt-command=COMMAND use given rmt COMMAND instead of rmt --rsh-command=COMMAND use remote COMMAND instead of rsh --volno-file=FILE use/update the volume number in FILE Device blocking: -b, --blocking-factor=BLOCKS BLOCKS x 51...
On Unix platform,tar commandis the primary archiving utility. Understanding various tar command options will help you master the archive file manipulation. In this article, let us review varioustar examplesincluding how to create tar archives (with gzip and bzip compression), extract a single file ...
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar. tar -tvf archive.tar # List all files in archive.tar verbosely. tar -xf archive.tar # Extract all files from archive.tar. 主操作模式: -A, --catenate, --concatenate 追加 tar 文件至归档 -c, --create 创建一...
tar -tvf archive.tar# List all files in archive.tar verbosely. 详细列出archive.tar中的所有文件。 tar -xf archive.tar# Extract all files from archive.tar. 从archive.tar解压所有文件。 主操作模式: -A, --catenate, --concatenate 追加 tar 文件至归档 -c, --create 创建一个新归档 -d, --dif...
--to-command=COMMAND将解压的文件通过管道传送至另一个程序 操作文件属性: --atime-preserve[=METHOD]在输出的文件上保留访问时间,要么通过在读取(默认 METHOD=‘replace’)后还原时间,要不就不要在第一次(METHOD=‘system’)设置时间 --delay-directory-restore 直到解压结束才设置修改时间和所解目录的权限 ...
tar -xvf archive.tar (the two lines below are the output of the command in the shell) testfile1 testfile2 ls -al total 20 drwxrwxr-x 2 myuser mygroup 59 Feb 10 21:21 . drwxr-xr-x 3 myuser mygroup 55 Feb 10 21:21 .. ...
创建档案的语法取决于档案类型。要制作存档,请使用taror-c操作--create。 创建一个 tar 存档 要制作 tar 存档(也称为 tarball),请使用: tar cf <archive name>.tar <file(s) or location(s)> 例如,归档文件目录: tar cf files.tar files 输出列出了添加到存档中的每个文件。显示目录内容以查看创建的file...
tar -xf archive.tar # Extract all files from archive.tar.主操作模式:-A, --catenate, --concatenate 追加 tar 文件至归档-c, --create 创建一个新归档-d, --diff, --compare 找出归档和文件系统的差异--delete 从归档(非磁带!)中删除-r, --append 追加文件至归档结尾-t, --list 列出归档内容--...
-z : 使用 gzip 来压缩和解压文件 -v : –verbose 详细的列出处理的文件 -f : –file=ARCHIVE 使用档案文件或设备,这个选项通常是必选的 -c : –create 创建一个新的归档(压缩包) -x : 从压缩包中解出文件 其它: tar 命令其实并不是真的解压缩的处理者,而是使用了 gzip 或者 bzip2 等其它命令来达成...
To add another file to an archive (which has to be uncompressed), enter the following command: tar -rf archive.tar example_extra.txt Copy How does a tar backup function? Webmasters like using tar to create backups: With it, the directory structure is retained and the program’s function...