using System; using System.Collections.Generic; using System.Text; namespace ClientPrintServer.Tools { public class CopyFilesKit { /// <summary> /// 拷贝文件夹到指定文件夹并更改文件夹名称 /// </summary> /// <param name="srcPath">源文件夹</param>
tar -zcvf /home/xahot.tar.gz /xahot tar -zcvf 打包后生成的文件名全路径 要打包的目录 例子:把/xahot文件夹打包后生成一个/home/xahot.tar.gz的文件. zip 压缩方法: 压缩当前的文件夹 zip -r ./xahot.zip ./* -r表示递归 zip [参数] [打包后的文件名] [打包的目录路径] 解压 unzip xahot.zip 不解释 linux zip命令的基本用法是: linux zip命令参数列表: