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命令参数列表:
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命令参数列表:
文件及内容处理 - tar.unip 1.tar:打包压缩命令 tar命令的功能说明 tar 命令常用语用于备份文件,tar 是用来建立,还原备份文件的工具程序,它可以加入,解开备份文件内的文件 tar命令的语法格式 tar [OPTION...] [FILE]... tar [参数] [文件] ... tar命令的常用参数说明: tar 参数很多,表1为 tar 命令的参数及说明: 表1: tar 命令的参数及说明 参数选项 解释说明 -A或--catenate 新增文件到已存在的备份文件.
比较文件夹diff,可以直接使用diff命令 [root@~]# diff -urNa dir1 dir2 -a Treat all files as text and compare them line-by-line, even if they do not seem to be text. -N, --new-file In directory comparison, if a file is found in only one directory, treat it as present