
for
windows,然后把下载到的可执行文件解压到某文件夹(例如d:\test)。
在打开系统属性,添加gzip.exe所在文件夹“d:\test”到PATH环境变量。(如果不想添加环境变量,那么把gzip.exe保存到批处理所在文件夹)
在批处理面加入下面这句,批处理执行到下面这句的时候就会解压test.c.Z
gzip
-d
test.c.Z
ps:
1、解压的时候test.c.Z文件会不见了,但是会出现解压完成的test.c文件
2、winrar可以在图形界面里面打开并解压.Z文件但是rar的cmd命令UnRar不支持解压.Z文件
zip 命令就行。想要更多的 说明,zip --help 或者 man zip
linux zip 命令详解
功能说明:压缩文件。
语 法:zip [-AcdDfFghjJKlLmoqrSTuvVwXyz$][-b <工作目录>][-ll][-n <字尾字符串>][-t <日期时间>][-<压缩效率>][压缩文件][文件...][-i <范本样式>][-x <范本样式>]
补充说明:zip是个使用广泛的压缩程序,文件经它压缩后会另外产生具有".zip"扩展名的压缩文件。
参 数:
-A 调整可执行的自动解压缩文件。
-b<工作目录>指定暂时存放文件的目录。
-c 替每个被压缩的文件加上注释。
-d 从压缩文件内删除指定的文件。
[-z "你好 linux"] 与命令 test -z 你好\ linux 是一致的。意义为检测字符串“你好 linux”是否存在, 不存在则返回真, 否则返回假。
以下是Help test的帮助信息:
test: test [expr]
Exits with a status of 0 (true) or 1 (false) depending on
the evaluation of EXPR. Expressions may be unary or binary. Unary
expressions are often used to examine the status of a file. There
are string operators as well, and numeric comparison operators.
File operators:
-a FILETrue if file exists.
-b FILETrue if file is block special.
-c FILETrue if file is character special.
-d FILETrue if file is a directory.
-e FILETrue if file exists.
-f FILETrue if file exists and is a regular file.
-g FILETrue if file is set-group-id.
-h FILETrue if file is a symbolic link.
-L FILETrue if file is a symbolic link.
-k FILETrue if file has its `sticky' bit set.
-p FILETrue if file is a named pipe.
-r FILETrue if file is readable by you.
-s FILETrue if file exists and is not empty.
-S FILETrue if file is a socket.
-t FD True if FD is opened on a terminal.
-u FILETrue if the file is set-user-id.
-w FILETrue if the file is writable by you.
-x FILETrue if the file is executable by you.
-O FILETrue if the file is effectively owned by you.
-G FILETrue if the file is effectively owned by your group.
-N FILETrue if the file has been modified since it was last read.
FILE1 -nt FILE2 True if file1 is newer than file2 (according to
modification date).
FILE1 -ot FILE2 True if file1 is older than file2.
FILE1 -ef FILE2 True if file1 is a hard link to file2.
String operators:
-z STRING True if string is empty.
-n STRING
STRING True if string is not empty.
STRING1 = STRING2
True if the strings are equal.
STRING1 != STRING2
True if the strings are not equal.
STRING1 <STRING2
True if STRING1 sorts before STRING2 lexicographically.
STRING1 >STRING2
True if STRING1 sorts after STRING2 lexicographically.
Other operators:
-o OPTION True if the shell option OPTION is enabled.
! EXPR True if expr is false.
EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.
EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.
arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,
-lt, -le, -gt, or -ge.
Arithmetic binary operators return true if ARG1 is equal, not-equal,
less-than, less-than-or-equal, greater-than, or greater-than-or-equal
than ARG2.
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)