Win10 cmd如何使用tar命令压缩和解压文件夹 |
您所在的位置:网站首页 › win10打开命令行的工具 › Win10 cmd如何使用tar命令压缩和解压文件夹 |
环境:
Win10 专业版 Microsoft Windows [版本 10.0.19041.208] 问题描述:Win10 cmd如何试用tar命令压缩和解压文件夹 C:\Users\Administrator>tar --help tar(bsdtar): manipulate archive files First option must be a mode specifier: -c Create -r Add/Replace -t List -u Update -x Extract Common Options: -b # Use # 512-byte records per I/O block -f Location of archive (default \\.\tape0) -v Verbose -w Interactive Create: tar -c [options] [ | | @ | -C ] , add these items to archive -z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma --format {ustar|pax|cpio|shar} Select archive format --exclude Skip files that match pattern -C Change to before processing remaining files @ Add entries from to output List: tar -t [options] [] If specified, list only entries that match Extract: tar -x [options] [] If specified, extract only entries that match -k Keep (don't overwrite) existing files -m Don't restore modification times -O Write entries to stdout, don't restore to disk -p Restore permissions (including ACLs, owner, file flags) bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp 命令参数解释 t 显示档案文件列表内容(已压缩的文件) x 解压档案文件 c 生成档案文件,创建打包文件 f 指定档案文件名称,f必须放在命令参数最后 解决方案:1.压缩文件 cmd命令 tar -cf xxx.tar.gz ./xxx 打包123.txt文件 tar -cf 123.tar.gz ./123.txt
2.解压文件 cmd命令 tar -xf xxx.tar.gz 解压 345.tar.gz文件 tar -xf 345.tar.gz |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |