方式一:利用已经打包好的tar文件,直接用压缩命令:压缩:compress [原文件名].tar解压:uncompress [原文件名].tar.Z方式二:一次性打包并压缩、解压并解包打包并压缩: tar -Zcvf [目标文件名].tar.Z [原文件名/目录名]解压并解包: tar -Zxvf [原文件名].tar.Z注:大写Z代表用ncompress算法来压缩/解压。另,...
方式一:利用已经打包好的tar文件,直接用压缩命令:压缩:compress [原文件名].tar解压:uncompress [原文件名].tar.Z方式二:一次性打包并压缩、解压并解包打包并压缩: tar -Zcvf [目标文件名].tar.Z [原文件名/目录名]解压并解包: tar -Zxvf [原文件名].tar.Z注:大写Z代表用ncompress算法来压缩/解压。另,...
[root@xuegod63 ~]# tar -tvf back.tar # List all files in archive.tar verbosely. 例4:对比加v的效果 [root@xuegod63 ~]# tar -xf back.tar [root@xuegod63 ~]# tar -xvf back.tar boot/grub/ boot/grub/splash.xpm.gz 9.1.2 tar 归档+压缩 语法:tar czvf newfile.tar.gz SOURCE 语法:tar...
GNU `tar' saves many files together into a single tape or disk archive, and can restore individual files from the archive. Examples: 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 archi...
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 创建一个新归档...
root@ubuntu:~ tar --help 用法: tar [选项...] [FILE]... Examples: tar -cf archive.tar foo bar# Create archive.tar from files foo and bar. 从文件foo和bar创建archive.tar。 tar -tvf archive.tar# List all files in archive.tar verbosely. 详细列出archive.tar中的所有文件。
/home/berners: directory [root@xiaolyu ~]# file /etc/init.d/network /etc/init.d/network: Bourne-Again shell script, ASCII text executable [root@xiaolyu ~]# 例:把两个目录或目标+文件打包成一个软件包 [root@xiaolyu ~]# tar cvf bb.tar /boot/ /etc/passwd ...
tar -xf archive.tar # Extract all files from archive.tar. 主操作模式: -A, --catenate, --concatenate 追加 tar 文件至归档 -c, --create 创建一个新归档 -d, --diff, --compare 找出归档和文件系统的差异 --delete 从归档(非磁带!)中删除 ...
tar-xf archive.tar# 展开归档文件 archive.tar 中的所有文件。 下面的参数-f是必须的 -f: 使用档案名字,切记,这个参数是最后一个参数,后面只能接档案名。 tar-cf all.tar *.jpg# 这条命令是将所有.jpg的文件打成一个名为all.tar的包。-c是表示产生新的包,-f指定包的文件名。tar-rf all.tar *.gif...
--atime-preserve[=METHOD] preserve access times on dumped files, either by restoring the times after reading (METHOD='replace'; default) or by not setting the times in the first place (METHOD='system') --delay-directory-restore delay setting modification times and ...